react-final-form
react-final-form copied to clipboard
Nested forms in react 17 don't work
Are you submitting a bug report or a feature request?
Bug
What is the current behavior?
With React 17, nested forms don't work if they are nested in the dom tree. You can see this little example, the inner form triggers a page reload because it's actually submitting the form. https://codesandbox.io/s/react-final-form-simple-example-forked-w4vifm
What is the expected behavior?
In React 16, this was working as expected. The inner form was submitted when the inner submit button was clicked.
Sandbox Link
https://codesandbox.io/s/react-final-form-simple-example-forked-w4vifm
Any news on this?
There won't be news because <form> elements can't be nested as per spec.
any news ?
Any news on this?
As GabenGar correctly states form elements are not allowed to be nested. You probably need to implement it as a Wizard form see (https://codesandbox.io/s/github/final-form/react-final-form/tree/master/examples/wizard).