stormy-gold
stormy-gold3d ago

How can I turn off the dialog confirm after escape form?

How can I turn off the dialog confirm after escape form?
2 Replies
kapa.ai
kapa.ai3d ago
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:
const { formProps } = useForm({
warnWhenUnsavedChanges: false,
});
const { formProps } = useForm({
warnWhenUnsavedChanges: false,
});
2. Globally in the <Refine> component:
<Refine
// ...other props
options={{
warnWhenUnsavedChanges: false,
}}
>
{/* ... */}
</Refine>
<Refine
// ...other props
options={{
warnWhenUnsavedChanges: false,
}}
>
{/* ... */}
</Refine>
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: ----------------------
kapa.ai
kapa.ai3d ago
<@761921731505946634> Kapa.ai is still learning and improving, please let me know how I did by reacting below.

Did you find this page helpful?