F
Filament3mo ago
CGM

Disable unsavedChangesAlerts() for specific resource or action.

I have an action where unsavedChangesAlerts() is causing issues and I would like to disable it only for that action. Is there any way to accomplish this without completely disabling it? I've been working along this line of thinking, but I can't seem to target the action class this way.
->unsavedChangesAlerts(function () {
// Not sure what to check for here as route is livewire.update
})
->unsavedChangesAlerts(function () {
// Not sure what to check for here as route is livewire.update
})
1 Reply
CGM
CGMOP3mo ago
My current solution is to move this form out of the action and onto it's own page so the unsavedChangesAlerts() can still work elsewhere. I would be very curious how to selectively disable this feature for specific forms or resources though. unsavedChangesAlerts() at the form level would be awesome!

Did you find this page helpful?