Distinguish between manual close vs cancel of Dialog component #5588
Unanswered
tylerpashigian
asked this question in
Q&A
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I have a Dialog with a form inside using TanStack Form. I have an apply button which essentially just closes the modal. However I would like to reset the form when either clicking the Dialog close button, backdrop, or the esc key. I know the Dialog has an
onOpenChange
prop, but there's no way to distinguish between a close and a "cancel" as far as I can tell. Any ideas?Beta Was this translation helpful? Give feedback.
All reactions