aboutsummaryrefslogtreecommitdiff
path: root/src/client/views/collections/CollectionDockingView.tsx
diff options
context:
space:
mode:
authorBob Zeleznik <zzzman@gmail.com>2019-06-22 16:25:25 -0400
committerBob Zeleznik <zzzman@gmail.com>2019-06-22 16:25:25 -0400
commitfe48c1ecea514b583c7cfa3567b0d674e0ab156e (patch)
treee857c12ff4878965e8bfee7c97cec5153b8b92cc /src/client/views/collections/CollectionDockingView.tsx
parent34fb7f7b334c8255908ec161bedbe699f2c5539b (diff)
fixed template issues w/ tree view opening in tabs
Diffstat (limited to 'src/client/views/collections/CollectionDockingView.tsx')
-rw-r--r--src/client/views/collections/CollectionDockingView.tsx9
1 files changed, 5 insertions, 4 deletions
diff --git a/src/client/views/collections/CollectionDockingView.tsx b/src/client/views/collections/CollectionDockingView.tsx
index 89fadab57..b403000ad 100644
--- a/src/client/views/collections/CollectionDockingView.tsx
+++ b/src/client/views/collections/CollectionDockingView.tsx
@@ -451,10 +451,11 @@ export class DockedFrameRenderer extends React.Component<DockedFrameProps> {
constructor(props: any) {
super(props);
DocServer.GetRefField(this.props.documentId).then(action((f: Opt<Field>) => {
- this._document = f as Doc;
- if (!this.props.dataDocumentId || this.props.documentId === this.props.dataDocumentId) this._dataDoc = this._document;
+ this._dataDoc = this._document = f as Doc;
+ if (this.props.dataDocumentId && this.props.documentId !== this.props.dataDocumentId) {
+ DocServer.GetRefField(this.props.dataDocumentId).then(action((f: Opt<Field>) => this._dataDoc = f as Doc));
+ }
}));
- if (this.props.dataDocumentId && this.props.documentId !== this.props.dataDocumentId) DocServer.GetRefField(this.props.dataDocumentId).then(action((f: Opt<Field>) => this._dataDoc = f as Doc));
}
nativeWidth = () => NumCast(this._document!.nativeWidth, this._panelWidth);
@@ -506,7 +507,7 @@ export class DockedFrameRenderer extends React.Component<DockedFrameProps> {
}
return (
<div className="collectionDockingView-content" ref={this._mainCont}
- style={{ transform: `translate(${this.previewPanelCenteringOffset}px, 0px) scale(${this.scaleToFitMultiplier}, ${this.scaleToFitMultiplier})` }}>
+ style={{ transform: `translate(${this.previewPanelCenteringOffset}px, 0px) scale(${this.scaleToFitMultiplier})` }}>
<DocumentView key={this._document[Id]}
Document={this._document}
DataDoc={this._dataDoc}