AllenFang / AllenFang/react-bootstrap-table

Warning: Each child in an array or iterator should have a unique "key" prop

未關閉
#1,960 0 則留言 0 個 reaction 已指派 0 人 在 GitHub 檢視
主要語言
JavaScript
星號
2.2k
分支
761
PR 合併指標
30 天內沒有已合併 PR

描述

Hey
I got my render here and each child get it's key prop but the below warning shows up on `tbody`.
Am I missing something?
Thanks!

```
render() {
const { health, platforms } = this.props;
const options = {
expandRowBgColor: 'rgb(242, 255, 163)'
};
return (

{[
,

Feature
,
...platforms.map(platform => {
const { device, os, osVersion, browser, browserVersion } = platform;
const key = JSON.stringify(platform);
return (

{`${device === 'desktop' ? '' : device} ${os} ${osVersion}`}
{' '}
{`${browser || ''} ${browserVersion || ''}`}

);
})
]}

);
}
```

```
Warning: Each child in an array or iterator should have a unique "key" prop. See https://fb.me/react-warning-keys for more information.
in tbody (created by TableBody)
in table (created by TableBody)
in div (created by TableBody)
in TableBody (created by BootstrapTable)
in div (created by BootstrapTable)
in div (created by BootstrapTable)
in BootstrapTable (at Health.js:41)
in _default (created by Connect(_default))
in Connect(_default) (created by Route)
in Route (at App.js:186)
in Router (at App.js:182)
in div (at App.js:181)
in section (at App.js:145)
in div (at App.js:57)
in App (created by Connect(App))
in Connect(App) (created by Route)
in Route (at index.js:13)
in Router (at index.js:12)
in Provider (at index.js:11)
```

貢獻指南

開啟貢獻指南

評估

這個 Issue 還沒有評估資料。

把新 issue 寄到你的電子郵件信箱

精選適合新手參與的 GitHub issue 摘要。