From adfe9bcc463e27b4c92f7faf60a907cba2c86fb4 Mon Sep 17 00:00:00 2001 From: Daniel Goodwin Date: Sat, 30 Nov 2024 23:43:04 -0500 Subject: [PATCH] Do not close group if it's the only group available --- packages/dockview-core/src/dockview/dockviewComponent.ts | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/packages/dockview-core/src/dockview/dockviewComponent.ts b/packages/dockview-core/src/dockview/dockviewComponent.ts index 5a20f5b84..8424e98f5 100644 --- a/packages/dockview-core/src/dockview/dockviewComponent.ts +++ b/packages/dockview-core/src/dockview/dockviewComponent.ts @@ -1793,6 +1793,10 @@ export class DockviewComponent } | undefined ): DockviewGroupPanel { + if (this.groups.length <= 1) { + return false; + } + const panels = [...group.panels]; // reassign since group panels will mutate if (!options?.skipDispose) {