A Select with mode set to "multiple" or "tags" throws the following error when wrapped in a ReduxForm field: Uncaught Error: must set key for <rc-animate> children
See original GitHub issueVersion
2.13.10
Environment
Windows 10, Google Chrome 62.0.3202.94
Reproduction link
https://codepen.io/pbgodwin/pen/ZayMNy?editors=0010#0
Steps to reproduce
- Build a RenderSelect stateless component that returns an ant design Select
- In a Redux Form, add a new Field component that uses the RenderSelect stateless component as its rendering component
- Add the field
mode="tags"
to the component from the last step
What is expected?
The form renders as expected, and a Select box that supports tags is added to the form
What is actually happening?
The Form and the rest of the Dom fail to render and React logs the following error to the console:
Uncaught Error: must set key for <rc-animate> children at unpkg.com/antd@2.13.10/dist/antd-with-locales.js:11157 at Array.map (<anonymous>) at Animate.render (unpkg.com/antd@2.13.10/dist/antd-with-locales.js:11152) at react-dom.js:5199 at measureLifeCyclePerf (react-dom.js:4479) at ReactCompositeComponentWrapper._renderValidatedComponentWithoutOwnerOrContext (react-dom.js:5198) at ReactCompositeComponentWrapper._renderValidatedComponent (react-dom.js:5225) at ReactCompositeComponentWrapper.performInitialMount (react-dom.js:4765) at ReactCompositeComponentWrapper.mountComponent (react-dom.js:4661) at Object.mountComponent (react-dom.js:11409)
I hit this while adding an Ant Design Select to one of the forms I was building in my site. I initially shared this repro as a comment on #5292, but seeing as that was closed today with a PR to react-components/tree-select I figured it may be more appropriate to open a separate issue. Let me know if you require anything further.
Issue Analytics
- State:
- Created 6 years ago
- Comments:6 (4 by maintainers)
Top GitHub Comments
You need set initial value to a array.
I need to delete all tag from taglist, then how to do it?