#359 - Delete metadata by key of deleted value (previously harcoded)

This commit is contained in:
Luis Correia 2017-04-13 12:45:32 +01:00
parent 805f958165
commit b75f86f4c2

View File

@ -102,7 +102,7 @@ export default class ListControl extends Component {
return (e) => {
e.preventDefault();
const { value, metadata, onChange, forID } = this.props;
const parsedMetadata = { [forID]: metadata.remove(metadata.keySeq().get(0)) };
const parsedMetadata = { [forID]: metadata.removeIn(value.get(index).valueSeq()) };
onChange(value.remove(index), parsedMetadata);
};
}