Skip to content

Commit 70014a8

Browse files
authored
Merge pull request #513 from mathuo/512-expose-close-on-group-api
feat: group.api.close
2 parents bb40c45 + d379b11 commit 70014a8

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

packages/dockview-core/src/api/dockviewGroupPanelApi.ts

+8
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ export interface DockviewGroupPanelApi extends GridviewPanelApi {
1616
maximize(): void;
1717
isMaximized(): boolean;
1818
exitMaximized(): void;
19+
close(): void;
1920
}
2021

2122
export interface DockviewGroupPanelFloatingChangeEvent {
@@ -46,6 +47,13 @@ export class DockviewGroupPanelApiImpl extends GridviewPanelApiImpl {
4647
this.addDisposables(this._onDidLocationChange);
4748
}
4849

50+
close(): void {
51+
if (!this._group) {
52+
return;
53+
}
54+
return this.accessor.removeGroup(this._group);
55+
}
56+
4957
getWindow(): Window {
5058
return this.location.type === 'popout'
5159
? this.location.getWindow()

0 commit comments

Comments
 (0)