Warning: Each child in a list should have a unique "key" prop.
MorganaUzhgorod opened this issue · 6 comments
MorganaUzhgorod commented
maximilianoforlenza commented
Hi @MorganaUzhgorod! Do you have an id
attribute in each child?
const data = {
id: 1,
name: 'something'
...
}
MorganaUzhgorod commented
@maximilianoforlenza No, I do not have :( I receive this data (Files tree list) from backend
maximilianoforlenza commented
@MorganaUzhgorod That's the problem, because actually react-treebeard doesn't has a "default index"
MorganaUzhgorod commented
@maximilianoforlenza, ok, Thanks 🖖
I wrote temporary solution. Function that add id to each element of JSON, and it's work without warning for this time.
Thanks ✋
maximilianoforlenza commented
@ MorganaUzhgorod
- fix: #222
- release: https://github.com/storybookjs/react-treebeard/releases/tag/v3.2.4
please let me know if not working. I close this issue.
leon0707 commented