F
Filament11mo ago
Azorky

Toggle afterStateUpdated call action

I would like when someone clicks the toggle, that a confirmation modal pop's up asking the user if he's sure that he wants to enable it. How can I do this? How can I call an action using afterStateUpdated?
9 Replies
Azorky
AzorkyOP11mo ago
Maybe with an action in afterStateUpdated or something?
Matthew
Matthew11mo ago
nah, you just add ->requiresConfirmation()
Azorky
AzorkyOP11mo ago
Require confirmation doesn't exist on a toggle, only on actions. Somehow it should be possible to call an action from an
->afterStateUpdated()
->afterStateUpdated()
No description
Matthew
Matthew11mo ago
Ohhh my bad. I have to think about this one. I cant look it up rn but maybe later tonight but i believe it should be possible
Azorky
AzorkyOP11mo ago
That would be awesome, I appreciate it! So far I haven't found a way, bit it would be a nice feature (in case it doesn't exist of course)
Matthew
Matthew11mo ago
😦 After doing a lot of experimenting, I couldnt find a way unfortunately I might make a PR to support this nativaly from filament
awcodes
awcodes11mo ago
Are you trying to do this in a form or in a table? Just curious.
Azorky
AzorkyOP11mo ago
In a form
Want results from more Discord servers?
Add your server