Interval ID for periodic change checks.
Duration between change checks, in milliseconds.
Whether to show the browser confirmation dialog.
ReadonlycontextWhen set to true, the initial form will always be considered dirty.
Useful for when the user just submitted an invalid form, in which case we
consider the form to be dirty even on initial load.
Note that the confirmationValue must still be set to true in order for
the browser confirmation dialog to appear.
Whether there are unsaved comment changes in the form.
Whether there are unsaved edits in the form.
OptionalinitialSerialized data of the initially rendered form.
Notify the user of changes to the form. Dispatch events to update the footer message via dispatching events.
OptionalpreviousPrevious serialized form data for continuous change detection.
StaticblessingsStaticinitialInitial delay before setting up the check interval to allow other initializations to complete, in milliseconds.
StaticnotifyDelay before notifying about changes, in milliseconds.
StaticoutletsStatictargetsStaticvaluesResolve the form's formData into a comparable string with any
unrelated data cleaned from the value.
Include handling of File field data to determine a comparable value.
StaticshouldCheck for changes in the form data and notify if there are any.
Clear the tracking changes values and messages.
Trigger the beforeunload confirmation dialog if active (confirm value is true).
Checks whether the form data has changed since the last call to this method.
whether the form data has changed
Take a snapshot of the current form data to use as the initial state for change detection.
When the form is submitted, ensure that the exit confirmation does not trigger. Deactivate the confirmation by setting the confirmation value to false.
Staticafter
Enables the controlled form to support prompting the user when they are about to move away from the page with potentially unsaved changes.
Example: - Warn the user when there are unsaved edits
Example: - Force the confirmation dialog