You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This issue occurs only with Simple (modal) resources.
The unsavedChangesAlerts() should only appear if new data has been entered. Currently, it shows even when no new data is added.
On the View/infolist page, unsavedChangesAlerts() still appears if you reload or refresh the page.
Expected behavior
Expected Behavior for Simple (Modal) Resources
Triggering unsavedChangesAlerts():
The unsavedChangesAlerts() function should only be triggered when there is a new or unsaved change in the data.
If no data has been added, modified, or removed, the alert should not appear.
Behavior After Clicking the Button Without Closing the Modal:
If a user clicks the button but does not close the modal and then refreshes the page, the unsavedChangesAlerts() should not activate unless there are actual unsaved changes.
Behavior on View/Infolist Pages:
When viewing or refreshing the View/infolist pages, unsavedChangesAlerts() should not be displayed, as these actions should not imply any unsaved changes.
This behavior ensures that users are only alerted when there is a legitimate risk of losing unsaved data, avoiding unnecessary warnings.
Steps to reproduce
Try it on my holiday Simple (modal) resources.
The problem happens after clicking the button, but not closing the modal. If you then refresh the page, the unsavedChangesAlerts() function triggers, even though no changes have been made. This can be seen here: https://app.screencast.com/06hEAEkreBfhN.
Reproduction repository (issue will be closed if this is not valid)
Package
filament/filament
Package Version
3.1
Laravel Version
11
Livewire Version
3
PHP Version
8.2
Problem description
This issue occurs only with Simple (modal) resources.
Expected behavior
Expected Behavior for Simple (Modal) Resources
This behavior ensures that users are only alerted when there is a legitimate risk of losing unsaved data, avoiding unnecessary warnings.
Steps to reproduce
Try it on my holiday Simple (modal) resources.
The problem happens after clicking the button, but not closing the modal. If you then refresh the page, the unsavedChangesAlerts() function triggers, even though no changes have been made. This can be seen here: https://app.screencast.com/06hEAEkreBfhN.
Reproduction repository (issue will be closed if this is not valid)
https://github.com/dharen008/demo
Relevant log output
No response
Donate 💰 to fund this issue
The text was updated successfully, but these errors were encountered: