extraModalFooterActions not working
What I want to do is customise what happens in the 'Cancel' action of a modal, but I can't find a way to do this. Here is what I've tried so far
None of the above seems to work. Like, the actions are not even executed. I don't know what I'm missing here. Most of the code is boilerplate or taken directly from the docs.
5 Replies
That's what I ended up doing, but the problem is that this actually submits the form, so you might get validation errors.
You can register an event in your Create/Edit page
and dispatch it
This sort of works but it's a bit limited (don't have access to some of the parameters that would be available to an action like Get/Set etc)
Anyway, the way I solved my issue was by applying the validation only after the 'cancel' check. So something like
This is a hacky workaround, but so was everything else I could think off so ...¯\_(ツ)_/¯
Anyway, thank you for your time, really appreciate it ❤️
I'll leave the question open for some time since I feel there might be a bug since I can't see anything that is obviously wrong with the original code - it should work. Even the examples from the docs here do nothing
https://filamentphp.com/docs/3.x/actions/modals#opening-another-modal-from-an-extra-footer-action
Anyway, if I get time, I'll dig deeper but unfortunately I don't grok Livewire/Filament 😦