diff options
| author | bobzel <zzzman@gmail.com> | 2020-09-11 18:07:08 -0400 |
|---|---|---|
| committer | bobzel <zzzman@gmail.com> | 2020-09-11 18:07:08 -0400 |
| commit | 1aacedfa3f558e243f2bca92c62fc0d0cfdce58a (patch) | |
| tree | aafcbac134fdaccd8b26908d0fb40c12052eeff2 /src/client/views/collections/TabDocView.tsx | |
| parent | 1b8eb5a59edfcef36e8f6450aca82de46d2044eb (diff) | |
| parent | e3c8534e129a3ce70a2673c92cadccec26f6cdc7 (diff) | |
Merge branch 'master' into bug_fixes
Diffstat (limited to 'src/client/views/collections/TabDocView.tsx')
| -rw-r--r-- | src/client/views/collections/TabDocView.tsx | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/src/client/views/collections/TabDocView.tsx b/src/client/views/collections/TabDocView.tsx index 589649ad9..aa1852250 100644 --- a/src/client/views/collections/TabDocView.tsx +++ b/src/client/views/collections/TabDocView.tsx @@ -146,6 +146,10 @@ export class TabDocView extends React.Component<TabDocViewProps> { CollectionDockingView.AddSplit(curPres, "right"); } DocumentManager.Instance.jumpToDocument(doc, false, undefined, Cast(doc.context, Doc, null)); + setTimeout(() => { + curPres._itemIndex = DocListCast(curPres.data).length - 1; + doc.treeViewOutlineMode && PresBox.Instance.progressivizeChild(null as any); + }, 100); } } } @@ -367,7 +371,7 @@ export class TabDocView extends React.Component<TabDocViewProps> { return (<div className="collectionDockingView-content" ref={ref => { if (this._mainCont = ref) { (this._mainCont as any).InitTab = (tab: any) => this.init(tab, this._document); - this.tab && DocServer.GetRefField(this.tab.contentItem.config.props.documentId).then(action(doc => doc instanceof Doc && (this._document = doc) && this.init(this.tab, this._document))); + DocServer.GetRefField(this.props.documentId).then(action(doc => doc instanceof Doc && (this._document = doc) && this.tab && this.init(this.tab, this._document))); } }} style={{ |
