Put key on the right element

This commit is contained in:
bartvde 2017-06-29 10:20:24 -05:00
parent 040d585d57
commit a3e3b9dfe3

View file

@ -49,18 +49,17 @@ class DynamicArrayInput extends React.Component {
const deleteValueBtn= <DeleteValueButton onClick={this.deleteValue.bind(this, i)} /> const deleteValueBtn= <DeleteValueButton onClick={this.deleteValue.bind(this, i)} />
const input = this.props.type === 'number' const input = this.props.type === 'number'
? <NumberInput ? <NumberInput
key={i}
value={v} value={v}
onChange={this.changeValue.bind(this, i)} onChange={this.changeValue.bind(this, i)}
/> />
: <StringInput : <StringInput
key={i}
value={v} value={v}
onChange={this.changeValue.bind(this, i)} onChange={this.changeValue.bind(this, i)}
/> />
return <div return <div
style={this.props.style} style={this.props.style}
key={i}
className="maputnik-array-block" className="maputnik-array-block"
> >
<div className="maputnik-array-block-action"> <div className="maputnik-array-block-action">