mirror of
https://gitee.com/ant-design/ant-design.git
synced 2024-11-30 11:08:45 +08:00
Fix key warnings
This commit is contained in:
parent
db4257e748
commit
67778ffa5a
@ -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