diff options
author | Shin'ya Ueoka <ueokande@i-beam.org> | 2019-05-27 21:09:36 +0900 |
---|---|---|
committer | Shin'ya Ueoka <ueokande@i-beam.org> | 2019-05-27 21:11:04 +0900 |
commit | 698f905145755954647f91ae01f5966b9e35a91e (patch) | |
tree | 822f314144bb3737fa80a1e1c251157ac7685866 /src/settings/components | |
parent | c8f54a899d6c98f6c6dceae4841685ffc733365b (diff) |
Save settings on switching a source
Diffstat (limited to 'src/settings/components')
-rw-r--r-- | src/settings/components/index.tsx | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/settings/components/index.tsx b/src/settings/components/index.tsx index b4a0866..eeac2cf 100644 --- a/src/settings/components/index.tsx +++ b/src/settings/components/index.tsx @@ -175,6 +175,7 @@ class SettingsComponent extends React.Component<Props> { if (from === 'form' && value === 'json') { this.props.dispatch(settingActions.switchToJson( this.props.form as FormSettings)); + this.save(); } else if (from === 'json' && value === 'form') { let b = window.confirm(DO_YOU_WANT_TO_CONTINUE); if (!b) { @@ -183,6 +184,7 @@ class SettingsComponent extends React.Component<Props> { } this.props.dispatch( settingActions.switchToForm(this.props.json as JSONSettings)); + this.save(); } } |