Skip to content
This repository has been archived by the owner on Nov 13, 2024. It is now read-only.

dex 1326 - frozen user settings page #433

Merged
merged 1 commit into from
Jul 25, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 6 additions & 2 deletions src/pages/settings/Settings.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -44,8 +44,12 @@ export default function Settings() {
const [formValues, setFormValues] = useState({});
useEffect(() => {
const initialValues = getInitialFormValues(schemas, data);
setFormValues({ ...initialValues, ...formValues });
}, [formValues, schemas, data]);

setFormValues(prevFormValues => ({
...initialValues,
...prevFormValues,
}));
}, [schemas, data]);

const backendValues = useMemo(
() => getInitialFormValues(schemas, data),
Expand Down