diff options
| author | bob <bcz@cs.brown.edu> | 2019-05-06 15:28:59 -0400 |
|---|---|---|
| committer | bob <bcz@cs.brown.edu> | 2019-05-06 15:28:59 -0400 |
| commit | 684c8e190098dee8c285665ebf1e2c598bd5cf4c (patch) | |
| tree | 4d40f064eb49e3781de98b76c352f39df3de9b3a /src/client/views/collections/CollectionDockingView.tsx | |
| parent | a9f465a32ac538c8dcf94bd37afda730e7be3526 (diff) | |
fixed a few golden layout and tree view issues.
Diffstat (limited to 'src/client/views/collections/CollectionDockingView.tsx')
| -rw-r--r-- | src/client/views/collections/CollectionDockingView.tsx | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/client/views/collections/CollectionDockingView.tsx b/src/client/views/collections/CollectionDockingView.tsx index 6f721a0c8..05c467763 100644 --- a/src/client/views/collections/CollectionDockingView.tsx +++ b/src/client/views/collections/CollectionDockingView.tsx @@ -78,14 +78,16 @@ export class CollectionDockingView extends React.Component<SubCollectionViewProp if (child.contentItems.length === 1 && child.contentItems[0].config.component === "DocumentFrameRenderer" && child.contentItems[0].config.props.documentId == document[Id]) { child.contentItems[0].remove(); - //this._goldenLayout.root.contentItems[0].contentItems.splice(i, 1); this.layoutChanged(document); + this.stateChanged(); } else child.contentItems.map((tab: any, j: number) => { if (tab.config.component === "DocumentFrameRenderer" && tab.config.props.documentId === document[Id]) { child.contentItems[j].remove(); + child.config.activeItemIndex = Math.max(child.contentItems.length - 1, 0); let docs = Cast(this.props.Document.data, listSpec(Doc)); docs && docs.indexOf(document) !== -1 && docs.splice(docs.indexOf(document), 1); + this.stateChanged(); } }); }) |
