fix key warning in tabs demo

This commit is contained in:
afc163 2018-12-13 22:58:14 +08:00
parent 860809f173
commit d1650e31e9
No known key found for this signature in database
GPG Key ID: 5F00908D72002306

View File

@ -41,13 +41,13 @@ class Demo extends React.Component {
<div>
<Select style={{ width: 200 }} onChange={(val) => { this.setState({ parentPos: val }); }}>
{positionList.map(pos => (
<Option value={pos}>Parent - {pos}</Option>
<Option key={pos} value={pos}>Parent - {pos}</Option>
))}
</Select>
<Select style={{ width: 200 }} onChange={(val) => { this.setState({ childPos: val }); }}>
{positionList.map(pos => (
<Option value={pos}>Child - {pos}</Option>
<Option key={pos} value={pos}>Child - {pos}</Option>
))}
</Select>