fix(widget-list): fix list item deletion (#1815)

This commit is contained in:
Bartholomew 2018-10-26 20:42:23 +01:00 committed by Shawn Erquhart
parent 55d45a812e
commit cd2036f500

View File

@ -181,7 +181,7 @@ export default class ListControl extends React.Component {
const { itemsCollapsed } = this.state;
const { value, metadata, onChange, field } = this.props;
const collectionName = field.get('name');
const isSingleField = this.valueType === valueTypes.SINGLE;
const isSingleField = this.getValueType() === valueTypes.SINGLE;
const metadataRemovePath = isSingleField ? value.get(index) : value.get(index).valueSeq();
const parsedMetadata = metadata && { [collectionName]: metadata.removeIn(metadataRemovePath) };