question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

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 issue

Version

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:closed
  • Created 6 years ago
  • Comments:6 (4 by maintainers)

github_iconTop GitHub Comments

7reactions
yesmeckcommented, Nov 15, 2017

You need set initial value to a array.

1reaction
Hardik21commented, Nov 29, 2017

I need to delete all tag from taglist, then how to do it?

Read more comments on GitHub >

github_iconTop Results From Across the Web

Objects are not valid as a React child error when giving value ...
If you check the error it is telling Object is not valid child. And to use array instead. Currently you are just printing...
Read more >
Uncaught Error: must set key for <rc-animate> children on ...
Uncaught Error : must set key for <rc-animate> children on modal(React-select)解决方式 const newDefaultValue = defaultValue.filter(e => e !== undefined); 1.
Read more >
Untitled
Akira 25th anniversary screening, Philips hr1863 viva collection juicer, Perler beads farm animals, Rabbit hunting northwest colorado, Song naruto shippuden ...
Read more >
Error: must set key for <rc-animate> children - 腾讯云开发者社区
Error : must set key for <rc-animate> children. 2018-06-14 20:54:00阅读1.1K0. 在使用antd-design中的select的组件时候,报了这样的一个错误:.
Read more >
Error: must set key for <rc-animate> children</rc ... - actorsfit
When using the select component in antd-design, an error like this was reported: Error: must set key for <rc-animate> children <FormItem {.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found