fix but failed
This commit is contained in:
parent
03cf265eff
commit
e2fb33bdc5
20 changed files with 74 additions and 98 deletions
|
@ -100,7 +100,7 @@ class KeymapsForm extends Component {
|
|||
return;
|
||||
}
|
||||
|
||||
let next = Object.assign({}, this.props.value);
|
||||
let next = { ...this.props.value };
|
||||
next[e.target.name] = e.target.value;
|
||||
|
||||
this.props.onChange(next);
|
||||
|
|
|
@ -44,7 +44,7 @@ class PropertiesForm extends Component {
|
|||
}
|
||||
|
||||
let name = e.target.name;
|
||||
let next = Object.assign({}, this.props.value);
|
||||
let next = { ...this.props.value };
|
||||
if (e.target.type.toLowerCase() === 'checkbox') {
|
||||
next[name] = e.target.checked;
|
||||
} else if (e.target.type.toLowerCase() === 'number') {
|
||||
|
|
|
@ -53,10 +53,10 @@ class SearchForm extends Component {
|
|||
let value = this.props.value;
|
||||
let name = e.target.name;
|
||||
let index = e.target.getAttribute('data-index');
|
||||
let next = Object.assign({}, {
|
||||
let next = {
|
||||
default: value.default,
|
||||
engines: value.engines ? value.engines.slice() : [],
|
||||
});
|
||||
};
|
||||
|
||||
if (name === 'name') {
|
||||
next.engines[index][0] = e.target.value;
|
||||
|
|
Reference in a new issue