F
Filament2w 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;
protected ?bool $hasUnsavedDataChangesAlert = false;
...
Jump to solution
2 Replies
Solution
LeandroFerreira
Maybe using this in the page?
protected ?bool $hasUnsavedDataChangesAlert = false;
protected ?bool $hasUnsavedDataChangesAlert = false;
CGM
CGMOP2w ago
That works! I have to put it in the <resource>/Pages/<resource>Edit.php Will check on the Actions next, but this was brilliant, thank you @Leandro Ferreira!
Want results from more Discord servers?
Add your server