-
Notifications
You must be signed in to change notification settings - Fork 830
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Ability to handle overlay/close clicks in Dialog component, onBeforeClose #1649
Comments
I don't think this is currently possible without hacking around the props exposed by the Dialog component. Our SideSheet component has this functionality (exposed through an In the meantime, you might want to set |
Thank @brandongregoryscott. I have indeed set |
I am implementing the Dialog component and need to show a "are you sure you want to discard" confirmation message when the user attempts to close the dialog.
Is it possible to run logic before closing the Dialog?
I am able to do this with the
onCancel
property but it appears it only triggers when the cancel button is clicked not when the modal is closed by clicking the overlay whenshouldCloseOnOverlayClick
is set to true.The text was updated successfully, but these errors were encountered: