diff options
| author | mehekj <mehek.jethani@gmail.com> | 2023-01-28 22:39:23 -0500 |
|---|---|---|
| committer | mehekj <mehek.jethani@gmail.com> | 2023-01-28 22:39:23 -0500 |
| commit | 9f139c7f0f571bdfea8ce99fc0a507724eb8fd74 (patch) | |
| tree | 4de6642112f9c6c2df1a85cf8fa9ed700bb94cbd /src/client/views/collections/CollectionDockingView.tsx | |
| parent | 9d2af1180f0dd5af5ab86b922cd8b0cdfcf4ea09 (diff) | |
| parent | 95b8a5a2b470d3118b6eeac484a45b23df2830b4 (diff) | |
Merge branch 'master' into schema-mehek
Diffstat (limited to 'src/client/views/collections/CollectionDockingView.tsx')
| -rw-r--r-- | src/client/views/collections/CollectionDockingView.tsx | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/src/client/views/collections/CollectionDockingView.tsx b/src/client/views/collections/CollectionDockingView.tsx index ffc004df6..1ead80bd0 100644 --- a/src/client/views/collections/CollectionDockingView.tsx +++ b/src/client/views/collections/CollectionDockingView.tsx @@ -156,10 +156,13 @@ export class CollectionDockingView extends CollectionSubView() { } const tab = Array.from(instance.tabMap.keys()).find(tab => tab.contentItem.config.props.panelName === panelName); if (tab) { - tab.header.parent.addChild(newConfig, undefined); const j = tab.header.parent.contentItems.indexOf(tab.contentItem); - !addToSplit && j !== -1 && tab.header.parent.contentItems[j].remove(); - return instance.layoutChanged(); + if (newConfig.props.documentId !== tab.header.parent.contentItems[j].config.props.documentId) { + tab.header.parent.addChild(newConfig, undefined); + !addToSplit && j !== -1 && tab.header.parent.contentItems[j].remove(); + return instance.layoutChanged(); + } + return false; } return CollectionDockingView.AddSplit(document, panelName, stack, panelName); } |
