Nesting a form in a dialog or dropdown #65747
Unanswered
pasqualevitiello
asked this question in
Help
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I am wrapping a form inside a dropdown component like this:
When I inspect the page, I see this error in the
action
attribute:javascript:throw new Error('A React form was unexpectedly submitted. If you called form.submit() manually, consider using form.requestSubmit() instead. If you\'re trying to use event.stopPropagation() in a submit event handler, consider also calling event.preventDefault().')
Even with this error, the form seems to work fine. So I've tried refactoring the code to address the error:
I couldn't find any similar examples in the documentation or in the repository examples either. Is it ok using the
onSubmit
event in this case?Beta Was this translation helpful? Give feedback.
All reactions