From 698f905145755954647f91ae01f5966b9e35a91e Mon Sep 17 00:00:00 2001 From: Shin'ya Ueoka Date: Mon, 27 May 2019 21:09:36 +0900 Subject: [PATCH] Save settings on switching a source --- src/settings/components/index.tsx | 2 ++ 1 file changed, 2 insertions(+) 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 { 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 { } this.props.dispatch( settingActions.switchToForm(this.props.json as JSONSettings)); + this.save(); } }