FilamentF
Filament13mo ago
CGM

How to disable ->unsavedChangesAlerts() for a single form?

How can I disable ->unsavedChangesAlerts() for a single Action in my panel? The feature is great, however I have a form I use to do some redirections and ->unsavedChangesAlerts() is causing problems.

The setting itself is set in the Filament provider, but how can I disable it? Can it be done on the $form? or with Javascript?
Solution
Maybe using this in the page?

protected ?bool $hasUnsavedDataChangesAlert = false;
Was this page helpful?