Hide modal heading without hiding cross

My table has a button called "Profile" which opens a modal. I want the modal to have all my own custom content (from components.person-profile) so I'm hiding the boilerplate heading. But this seems to also hide the cross close button in the top right of the modal. Is there a way to do this so the cross remains? Action::make('Profile') ->modalHeading('') // removes close button ->modalContent(fn (Person $record): View => view( 'components.person-profile', [ 'person' => $record, ], )),
Solution:
Looks like the close button only exists inside the header. As a work around you can add your own close button in the modal content view with x-on:click=“close()” and it should work the same....
Jump to solution
3 Replies
Solution
awcodes
awcodes7mo ago
Looks like the close button only exists inside the header. As a work around you can add your own close button in the modal content view with x-on:click=“close()” and it should work the same.
awcodes
awcodes7mo ago
Doing this in one of my own plugins with a header less modal and it’s working correctly.
<x-filament::icon-button
x-on:click="close()"
icon="heroicon-o-x-mark"
color="gray"
/>
<x-filament::icon-button
x-on:click="close()"
icon="heroicon-o-x-mark"
color="gray"
/>
urbycoz
urbycozOP7mo ago
Nice solution. Thanks
Want results from more Discord servers?
Add your server