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:
parent
aaead7b4b9
commit
64ffe53949
@ -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(','));
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user