Unsaved Data Warning

1. Create a page level flag, savedFlag, set it to false at the fields Value change you want to validate for data.
2. Create an action chain beforeExitWarning, which checks if saved flag is true or not.


        If true return success with no param


○ In case of failure, open a dialog you want to show the warning with yes or no button. And return a payload of object type, this stops navigation.





Create a dialog and add message and yes and no buttons validation, updating flag in case of no to false and true in case of yes. In case of yes try to navigate out of the page.


Now that condition is updated, the page navigation will happen since before exit condition will be true.

Comments