Specify default props
This commit is contained in:
parent
808344eecf
commit
fce2434dcd
4 changed files with 8 additions and 19 deletions
src/settings/components/form
|
@ -30,10 +30,6 @@ class KeymapsForm extends React.Component {
|
|||
}
|
||||
|
||||
bindValue(e) {
|
||||
if (!this.props.onChange) {
|
||||
return;
|
||||
}
|
||||
|
||||
let next = { ...this.props.value };
|
||||
next[e.target.name] = e.target.value;
|
||||
|
||||
|
@ -48,6 +44,7 @@ KeymapsForm.propTypes = {
|
|||
|
||||
KeymapsForm.defaultProps = {
|
||||
value: {},
|
||||
onChange: () => {},
|
||||
};
|
||||
|
||||
export default KeymapsForm;
|
||||
|
|
Reference in a new issue