Rename valueOf to fromJSON

This commit is contained in:
Shin'ya UEOKA 2019-10-07 12:02:02 +00:00
parent 16352502cf
commit 532eeb5a1d
9 changed files with 30 additions and 30 deletions

View file

@ -12,7 +12,7 @@ interface Props {
class KeymapsForm extends React.Component<Props> {
public static defaultProps: Props = {
value: FormKeymaps.valueOf({}),
value: FormKeymaps.fromJSON({}),
onChange: () => {},
onBlur: () => {},
};

View file

@ -12,7 +12,7 @@ interface Props {
class SearchForm extends React.Component<Props> {
public static defaultProps: Props = {
value: FormSearch.valueOf({ default: '', engines: []}),
value: FormSearch.fromJSON({ default: '', engines: []}),
onChange: () => {},
onBlur: () => {},
};
@ -81,7 +81,7 @@ class SearchForm extends React.Component<Props> {
}
}
this.props.onChange(FormSearch.valueOf(next));
this.props.onChange(FormSearch.fromJSON(next));
if (name === 'delete' || name === 'default') {
this.props.onBlur();
}