import React, {Component, PropTypes} from 'react' import DebouncingInput from './DebouncingInput' class KeyValueEditor extends Component { _addField () { console.log('_addField'); this.props.onChange([...this.props.pairs, {name: '', value: ''}]); } _onChangeName (position, name) { this.props.onChange( this.props.pairs.map((p, i) => i == position ? Object.assign({}, p, {name}) : p) ); } render () { const {pairs} = this.props; return (