Unsaved alerts show always pops up even if no changes made - `mask(RawJs::make('$money($input)'))`
Package
Panel builder
Package Version
v3.2.63
How can we help you?
Issue Description
When using RawJs::make('$money($input)') with a field that has unsavedChangesAlerts(), the alert Changes you made may not be saved. is always displayed when navigating away from the page, even if no changes were made.
Code Example
Question
Is there a way to prevent Filament from showing the alert if no changes have been made?
Solution:Jump to solution
I guess mask modifies the state on the client side and therefore it think itβs unsaved. Not sure whether we can solve this without increasing the complexity but you can still try submitting an issue.
5 Replies
Can you upgrade to the latest version and check whether it still happens? If yes, can you create an issue on GitHub?
Does it happen only when you have
->mask()
or ->stripCharacter()
?Will give this a try and open an issue on GitHub if this still happens.
The issue is when using
->mask()
and not ->stripCharacters(',')
Solution
I guess mask modifies the state on the client side and therefore it think itβs unsaved. Not sure whether we can solve this without increasing the complexity but you can still try submitting an issue.
Thanks will create an issue. And if I get a chance will see if I can get a PR.
I would say that mask is definitely modifying the state since itβs entangled via alpine.