mirror of
https://github.com/Unleash/unleash.git
synced 2025-06-14 01:16:17 +02:00
bugfix input list
This commit is contained in:
parent
aaead7b4b9
commit
64ffe53949
@ -8,7 +8,7 @@ import {
|
|||||||
export default class InputList extends Component {
|
export default class InputList extends Component {
|
||||||
|
|
||||||
static propTypes = {
|
static propTypes = {
|
||||||
field: PropTypes.string.isRequired,
|
name: PropTypes.string.isRequired,
|
||||||
list: PropTypes.array.isRequired,
|
list: PropTypes.array.isRequired,
|
||||||
setConfig: PropTypes.func.isRequired,
|
setConfig: PropTypes.func.isRequired,
|
||||||
}
|
}
|
||||||
@ -38,12 +38,12 @@ export default class InputList extends Component {
|
|||||||
e.stopPropagation();
|
e.stopPropagation();
|
||||||
}
|
}
|
||||||
|
|
||||||
const { field, list, setConfig } = this.props;
|
const { name, list, setConfig } = this.props;
|
||||||
const inputValue = document.querySelector(`[name="${field}_input"]`);
|
const inputValue = document.querySelector(`[name="${name}_input"]`);
|
||||||
if (inputValue && inputValue.value) {
|
if (inputValue && inputValue.value) {
|
||||||
list.push(inputValue.value);
|
list.push(inputValue.value);
|
||||||
inputValue.value = '';
|
inputValue.value = '';
|
||||||
setConfig(field, list.join(','));
|
setConfig(name, list.join(','));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user