How can I turn off the dialog confirm after escape form?
How can I turn off the dialog confirm after escape form?
2 Replies
Hi @tingadev. I'm kapa.ai, your friendly support bot. I will try to answer your question by searching through the knowledge base. :wave:
----------------------
To turn off the dialog confirmation that appears when you try to leave a form with unsaved changes in refine, you can set the
warnWhenUnsavedChanges
property to false
. This can be done in two ways:
1. At the form level using the useForm
hook:
2. Globally in the <Refine>
component:
By setting warnWhenUnsavedChanges
to false
, the confirmation dialog will not appear when you try to leave the form with unsaved changes.
For more information, you can refer to the following documentation:
- useForm hook documentation
- Refine component options
Remember that disabling this feature means users might accidentally lose unsaved changes when navigating away from the form.
----------------------
Note: you can ask me a follow up question by @ mentioning me again :speech_balloon:
----------------------<@761921731505946634> Kapa.ai is still learning and improving, please let me know how I did by reacting below.