1
0
mirror of https://github.com/Unleash/unleash.git synced 2024-12-22 19:07:54 +01:00

bugfix input list

This commit is contained in:
ivaosthu 2016-12-17 11:43:40 +01:00
parent aaead7b4b9
commit 64ffe53949

View File

@ -8,7 +8,7 @@ import {
export default class InputList extends Component {
static propTypes = {
field: PropTypes.string.isRequired,
name: PropTypes.string.isRequired,
list: PropTypes.array.isRequired,
setConfig: PropTypes.func.isRequired,
}
@ -38,12 +38,12 @@ export default class InputList extends Component {
e.stopPropagation();
}
const { field, list, setConfig } = this.props;
const inputValue = document.querySelector(`[name="${field}_input"]`);
const { name, list, setConfig } = this.props;
const inputValue = document.querySelector(`[name="${name}_input"]`);
if (inputValue && inputValue.value) {
list.push(inputValue.value);
inputValue.value = '';
setConfig(field, list.join(','));
setConfig(name, list.join(','));
}
}