From e69f27d3193e816c62dc58f0e811932b4d733f9c Mon Sep 17 00:00:00 2001 From: Matt Rubens Date: Thu, 20 Feb 2025 13:20:11 -0500 Subject: [PATCH] Fix settings done button with unsaved changes --- .changeset/twenty-rice-own.md | 5 +++++ webview-ui/src/components/settings/SettingsView.tsx | 7 +++++-- 2 files changed, 10 insertions(+), 2 deletions(-) create mode 100644 .changeset/twenty-rice-own.md diff --git a/.changeset/twenty-rice-own.md b/.changeset/twenty-rice-own.md new file mode 100644 index 0000000000..0c3ccb141a --- /dev/null +++ b/.changeset/twenty-rice-own.md @@ -0,0 +1,5 @@ +--- +"roo-cline": patch +--- + +Fix settings done button with unsaved changes diff --git a/webview-ui/src/components/settings/SettingsView.tsx b/webview-ui/src/components/settings/SettingsView.tsx index 495bf49bd7..f4c49b398d 100644 --- a/webview-ui/src/components/settings/SettingsView.tsx +++ b/webview-ui/src/components/settings/SettingsView.tsx @@ -173,7 +173,6 @@ const SettingsView = forwardRef(({ onDone }, text: currentApiConfigName, apiConfiguration, }) - // onDone() setChangeDetected(false) } } @@ -217,7 +216,11 @@ const SettingsView = forwardRef(({ onDone }, const onConfirmDialogResult = useCallback((confirm: boolean) => { if (confirm) { - confirmDialogHandler.current?.() + setChangeDetected(false) + // Wait for the change detection to be updated + setTimeout(() => { + confirmDialogHandler.current?.() + }, 100) } }, [])