Merge pull request #1090 from RooVetGit/fix_settings_done_button_with_unsaved_changes

Fix settings done button with unsaved changes
This commit is contained in:
Matt Rubens 2025-02-20 15:50:22 -05:00 committed by GitHub
commit d327c21828
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 10 additions and 2 deletions

View file

@ -0,0 +1,5 @@
---
"roo-cline": patch
---
Fix settings done button with unsaved changes

View file

@ -173,7 +173,6 @@ const SettingsView = forwardRef<SettingsViewRef, SettingsViewProps>(({ onDone },
text: currentApiConfigName,
apiConfiguration,
})
// onDone()
setChangeDetected(false)
}
}
@ -217,7 +216,11 @@ const SettingsView = forwardRef<SettingsViewRef, SettingsViewProps>(({ onDone },
const onConfirmDialogResult = useCallback((confirm: boolean) => {
if (confirm) {
confirmDialogHandler.current?.()
setChangeDetected(false)
// Wait for the change detection to be updated
setTimeout(() => {
confirmDialogHandler.current?.()
}, 100)
}
}, [])