mirror of
https://github.com/ant-design/ant-design.git
synced 2024-11-28 05:05:48 +08:00
Fix key warnings
This commit is contained in:
parent
1ea1a62d19
commit
7e5630f97d
@ -60,7 +60,7 @@ InstantClickChangeFns.push(function () {
|
||||
});
|
||||
var options = versions.map(function(version) {
|
||||
var link = versionsHistory[version];
|
||||
return <option value={version}>{version}</option>;
|
||||
return <option key={version} value={version}>{version}</option>;
|
||||
});
|
||||
function onChange(e) {
|
||||
if (versionsHistory[e.target.value]) {
|
||||
|
@ -77,8 +77,8 @@ let Palette = React.createClass({
|
||||
let color = this.props.color;
|
||||
return <div className="color-palette">
|
||||
<div className="main-color">
|
||||
{color.colors.map(function(color){
|
||||
return (<div style={{backgroundColor:color}}></div>);
|
||||
{color.colors.map(function(color) {
|
||||
return (<div key={color} style={{backgroundColor:color}}></div>);
|
||||
})}
|
||||
</div>
|
||||
<div className={"color-msg"}>
|
||||
@ -183,8 +183,8 @@ let ExtendPalettes = React.createClass({
|
||||
}
|
||||
];
|
||||
return <div>
|
||||
{colors.map((color) => {
|
||||
return <Palette color={color} />;
|
||||
{colors.map((color, i) => {
|
||||
return <Palette key={i} color={color} />;
|
||||
})}
|
||||
</div>;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user