Skip to content

Commit 38323d9

Browse files
committed
fix: failed to find group
1 parent 73e5dc3 commit 38323d9

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

packages/dockview-core/src/dockview/dockviewComponent.ts

+5-5
Original file line numberDiff line numberDiff line change
@@ -800,7 +800,7 @@ export class DockviewComponent
800800
group = item;
801801

802802
const popoutReferenceGroupId = this._popoutGroups.find(
803-
(_) => _.popoutGroup === group
803+
(_) => _.popoutGroup.id === group.id
804804
)?.referenceGroup;
805805
const popoutReferenceGroup = popoutReferenceGroupId
806806
? this.getPanel(popoutReferenceGroupId)
@@ -1715,7 +1715,7 @@ export class DockviewComponent
17151715

17161716
if (group.api.location.type === 'floating') {
17171717
const floatingGroup = this._floatingGroups.find(
1718-
(_) => _.group === group
1718+
(_) => _.group.id === group.id
17191719
);
17201720

17211721
if (floatingGroup) {
@@ -1728,7 +1728,7 @@ export class DockviewComponent
17281728
remove(this._floatingGroups, floatingGroup);
17291729
floatingGroup.dispose();
17301730

1731-
if (!options?.skipActive && this._activeGroup === group) {
1731+
if (!options?.skipActive && this._activeGroup?.id === group.id) {
17321732
const groups = Array.from(this._groups.values());
17331733

17341734
this.doSetGroupAndPanelActive(
@@ -1744,7 +1744,7 @@ export class DockviewComponent
17441744

17451745
if (group.api.location.type === 'popout') {
17461746
const selectedGroup = this._popoutGroups.find(
1747-
(_) => _.popoutGroup === group
1747+
(_) => _.popoutGroup.id === group.id
17481748
);
17491749

17501750
if (selectedGroup) {
@@ -1771,7 +1771,7 @@ export class DockviewComponent
17711771
this.doSetGroupAndPanelActive(removedGroup);
17721772
}
17731773

1774-
if (!options?.skipActive && this._activeGroup === group) {
1774+
if (!options?.skipActive && this._activeGroup?.id === group.id) {
17751775
const groups = Array.from(this._groups.values());
17761776

17771777
this.doSetGroupAndPanelActive(

0 commit comments

Comments
 (0)