#359 - Delete metadata by key of deleted value (previously harcoded)
This commit is contained in:
parent
805f958165
commit
b75f86f4c2
@ -102,7 +102,7 @@ export default class ListControl extends Component {
|
|||||||
return (e) => {
|
return (e) => {
|
||||||
e.preventDefault();
|
e.preventDefault();
|
||||||
const { value, metadata, onChange, forID } = this.props;
|
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);
|
onChange(value.remove(index), parsedMetadata);
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user