F
Filament2mo ago
Isak

function inside the: ->modalCloseButton()

Hi, I have a question. Is it possible to pass a function inside the ->modalCloseButton() when it is clicked? I wanted to do something like this:
->modalCloseButton(function () {
$this->dispatch('event');
})
->modalCloseButton(function () {
$this->dispatch('event');
})
this is just an example of how I wanted it; I know it doesn't work this way, but I wanted to see if there's any way to do it. I am opening the modal using: ->modalContent()
2 Replies
Dennis Koch
Dennis Koch2mo ago
Not with the modalCloseButton(). That only accepts a bool. But you can override the actions in the footer via modalFooterActions()
Isak
IsakOP2mo ago
Okay, thanks.
Want results from more Discord servers?
Add your server