fix environment not update issue when switch tab (#8823)

This commit is contained in:
Kent Wang
2025-07-01 14:23:11 +08:00
committed by GitHub
parent 228f1b25d9
commit 2dd3dbe137

View File

@@ -65,7 +65,16 @@ export const RequestGroupPane: FC<{ settings: Settings }> = ({ settings }) => {
return (
<>
<Tabs aria-label="Request group tabs" className="flex h-full w-full flex-1 flex-col">
<Tabs
aria-label="Request group tabs"
className="flex h-full w-full flex-1 flex-col"
onSelectionChange={key => {
// Save environment changes when nav away from environment tab.
if (key !== 'environment' && environmentEditorRef) {
saveChanges();
}
}}
>
<TabList
className="flex h-[--line-height-sm] w-full flex-shrink-0 items-center overflow-x-auto border-b border-solid border-b-[--hl-md] bg-[--color-bg]"
aria-label="Request pane tabs"