Handling Unsaved Changes in MUI Dialog with RJSF

Author: aress31Created Dec 9, 2024Updated Sep 11, 2026
Labelsquestionawaiting response

Prerequisites

What theme are you using?

mui

Is your feature request related to a problem? Please describe.

I am using a combination of MUI Dialog and my form inside it, and I would like to notify users of any unsaved changes before they close the dialog. Is there a way to achieve this with RJSF? If not, could this feature be considered for inclusion in the roadmap?

Describe the solution you'd like

We need a way to expose the global dirty state of the form, allowing us to handle it programmatically. This would enable us to prompt an error message in the Dialog's onClose event if the form is dirty.

Maybe a warnWhenUnsavedChanges option and a hook?

Describe alternatives you've considered

No response

Source: rjsf-team/react-jsonschema-form