-
Notifications
You must be signed in to change notification settings - Fork 8.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[ResponseOps][Rules]Discard unsaved changes warning gets triggered un…
…necessarily when user clicks on cancel or x without making any changes (#200559) Closes #153606 ## Summary - the "Discard unsaved changes" warning was triggered unnecessarily when the user clicked on "Cancel" or "X" on the edit rule form without making any changes. The problem was caused by the "touched" property of "useRuleFormState" being set to true by default when the page was opened. - updated the logic so that "touched" is only set to true if actual changes are made https://github.com/user-attachments/assets/b20b5c94-5d53-42cd-a7cf-5f951a1ed43e
- Loading branch information
1 parent
b512ee4
commit caee6c6
Showing
3 changed files
with
64 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters