Fix settings done button with unsaved changes

This commit is contained in:
Matt Rubens 2025-02-20 13:20:11 -05:00
parent 7171a0ed6e
commit e69f27d319
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)
}
}, [])