react-final-form
react-final-form copied to clipboard
Field Conditional rendering for multiple inner Fields break
Are you submitting a bug report or a feature request?
Possibly a bug
What is the current behavior?
Field
children render prop, returning two or more inner Fields
(conditional rendering) behaves unexpectedly in the ui and does not subscribe to corresponding names
What is the expected behavior?
Conditional Field
should render and subscribe correct fields
Sandbox Link
https://codesandbox.io/s/react-final-form-conditional-fields-forked-dze46?file=/src/index.js
https://codesandbox.io/s/react-final-form-conditional-fields-forked-dze46?file=/src/index.js
What's your environment?
node: 12.18.3
OS: mac
browser: chrome
"react-final-form": "^6.3.5",
"final-form": "^4.18.7",
"react": "^16.13.0",
Other information
I have seen the docs example for conditional rendering but still this is a weird bug
Not a bug. You're rendering a list of things without unique keys. The virtual dom don't know what to update.
https://reactjs.org/docs/lists-and-keys.html
This should be closed.
@bluSCALE4 tnx...