diff --git a/src/components/CentralContainer/Sidebar/SidebarTabs/SettingsTabPanel/index.tsx b/src/components/CentralContainer/Sidebar/SidebarTabs/SettingsTabPanel/index.tsx index a0adf7ba..de360697 100644 --- a/src/components/CentralContainer/Sidebar/SidebarTabs/SettingsTabPanel/index.tsx +++ b/src/components/CentralContainer/Sidebar/SidebarTabs/SettingsTabPanel/index.tsx @@ -112,7 +112,6 @@ const getConfigFormFields = (profileName: ProfileName) => { */ const handleConfigFormReset = (ev: React.FormEvent) => { ev.preventDefault(); - window.localStorage.clear(); window.location.reload(); }; @@ -129,6 +128,8 @@ const SettingsTabPanel = () => { ); const [profilesMetadata, setProfilesMetadata] = useState>(listProfiles()); + const [canApply, setCanApply] = useState(false); + const [canReload, setCanReload] = useState(false); const handleConfigFormSubmit = useCallback((ev: React.FormEvent) => { ev.preventDefault(); @@ -160,6 +161,8 @@ const SettingsTabPanel = () => { } setProfilesMetadata(listProfiles()); + setCanApply(false); + setCanReload(true); }, [ postPopUp, selectedProfileName, @@ -185,6 +188,9 @@ const SettingsTabPanel = () => { tabIndex={-1} onReset={handleConfigFormReset} onSubmit={handleConfigFormSubmit} + onChange={() => { + setCanApply(true); + }} > { <> @@ -225,7 +233,7 @@ const SettingsTabPanel = () => { size={"sm"} sx={{flexGrow: 1}} value={selectedProfileName} - startDecorator={ + endDecorator={ { - - - - - + + + { forceProfile(newForcedProfileName); setProfilesMetadata(listProfiles()); + setCanReload(true); }} >