Skip to content

Commit

Permalink
fix: reset chat settings form to default on cancel
Browse files Browse the repository at this point in the history
Signed-off-by: San Nguyen <[email protected]>
  • Loading branch information
sandangel committed Feb 8, 2025
1 parent 2c7ae66 commit 8067aa8
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion frontend/src/components/ChatSettings/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,10 @@ export default function ChatSettingsModal() {
reset(chatSettingsValue);
}, [chatSettingsValue, reset]);

const handleClose = () => setChatSettingsOpen(false);
const handleClose = () => {
setChatSettingsOpen(false);
reset(chatSettingsDefaultValue);
};

const handleConfirm = handleSubmit((data) => {
const processedValues = mapValues(data, (x: TFormInputValue) =>
Expand Down

0 comments on commit 8067aa8

Please sign in to comment.