Close modal from a "extraModalFooterActions"
I have a table with a
Filament\Tables\Actions\Action
action that opens a modal. This modal also has a extraModalFooterActions
action which works as expected. I want the modal to close when the extraModalFooterActions
action is completed, how can I go about this?
I can't seem to find a way to give the modal a custom ID or retrieve the modals ID to be able to dispatch a close event.
This is my current code:
Solution:Jump to solution
I think you just need to use makeModalSubmitAction() here. have you read this:
https://filamentphp.com/docs/3.x/actions/modals#adding-an-extra-modal-action-button-to-the-footer...
5 Replies
Solution
I think you just need to use makeModalSubmitAction() here. have you read this:
https://filamentphp.com/docs/3.x/actions/modals#adding-an-extra-modal-action-button-to-the-footer
Or even just modify the existing modalSubmitAction instead of setting it to false:
https://filamentphp.com/docs/3.x/actions/modals#modifying-a-default-modal-footer-action-button
cancelParentActions()
might be what you're looking for
https://filamentphp.com/docs/3.x/actions/modals#opening-another-modal-from-an-extra-footer-actionThanks! This worked π
No worries. You can mark my answer as the solution by clicking More -> Apps -> Mark Solution, so that it shows up for others with the same issue.