return (
<div className="input_group" key={j}>
- <TextInput type="text" onChange={props.nsFn.placementGroupUpdate.bind(self, i, j, 'key')} placeholder="KEY" value={key} />
- <TextInput type="text" onChange={props.nsFn.placementGroupUpdate.bind(self, i, j, 'value')} placeholder="VALUE" value={value} />
+ <TextInput type="text" onChange={props.nsFn.hostAggregateUpdate.bind(self, i, j, 'key')} placeholder="KEY" value={key} />
+ <TextInput type="text" onChange={props.nsFn.hostAggregateUpdate.bind(self, i, j, 'value')} placeholder="VALUE" value={value} />
<span onClick={props.nsFn.removeHostAggregate.bind(self, i, j)} className="removeInput"><img src={imgRemove} />Remove</span>
</div>
)
dataCenterID: JSON.parse(dataCenter.target.value)
});
},
- placementGroupUpdate: (i, k, value) => {
+ placementGroupUpdate: (i, k, event) => {
+ let value = event.target.value;
let pg = self['ns-placement-groups'];
pg[i][k] = value;
self.setState({
'ns-placement-groups': pg
})
},
- hostAggregateUpdate: (pgi, hai, k, value) => {
+ hostAggregateUpdate: (pgi, hai, k, event) => {
+ let value = event.target.value;
let pg = self['ns-placement-groups'];
let ha = pg[pgi]['host-aggregate'][hai];
ha[k] = value;
vnfFn = () => {
let self = this;
return {
- placementGroupUpdate: (i, k, value) => {
+ placementGroupUpdate: (i, k, event) => {
+ let value = event.target.value;
let pg = self['vnf-placement-groups'];
pg[i][k] = value;
self.setState({
'vnf-placement-groups': pg
})
},
- hostAggregateUpdate: (pgi, hai, k, value) => {
+ hostAggregateUpdate: (pgi, hai, k, event) => {
+ let value = event.target.value;
let pg = self['vnf-placement-groups'];
let ha = pg[pgi]['host-aggregate'][hai];
ha[k] = value;