diff options
| author | bobzel <zzzman@gmail.com> | 2023-12-01 02:33:04 -0500 |
|---|---|---|
| committer | bobzel <zzzman@gmail.com> | 2023-12-01 02:33:04 -0500 |
| commit | 9ae07e29f41df9d64985c25b67054843a99a0224 (patch) | |
| tree | 092fc2062bbca4c6d59cb6c49e977197addf5556 /src/client/views/collections/CollectionTreeView.tsx | |
| parent | 0e9f8ceceeca5bca7888cb611afb4d2b9963d5ae (diff) | |
converted props.DataDoc to props.TemplateDataDocument and fixed so that it's always undefined unless it's a template. converted references from rootDocument to props.TemplateDataDocument.
Diffstat (limited to 'src/client/views/collections/CollectionTreeView.tsx')
| -rw-r--r-- | src/client/views/collections/CollectionTreeView.tsx | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/client/views/collections/CollectionTreeView.tsx b/src/client/views/collections/CollectionTreeView.tsx index 36ea14d92..1315decb2 100644 --- a/src/client/views/collections/CollectionTreeView.tsx +++ b/src/client/views/collections/CollectionTreeView.tsx @@ -63,7 +63,7 @@ export class CollectionTreeView extends CollectionSubView<Partial<collectionTree return this.props.Document; } @computed get dataDoc() { - return this.props.DataDoc || this.doc; + return this.props.TemplateDataDocument || this.doc; } @computed get treeViewtruncateTitleWidth() { return NumCast(this.doc.treeView_TruncateTitleWidth, this.panelWidth()); @@ -166,7 +166,7 @@ export class CollectionTreeView extends CollectionSubView<Partial<collectionTree const prev = ind && DocListCast(targetDataDoc[this.props.fieldKey])[ind - 1]; this.props.removeDocument?.(doc); if (ind > 0 && prev) { - FormattedTextBox.SelectOnLoad = prev[Id]; + FormattedTextBox.SetSelectOnLoad(prev); DocumentManager.Instance.getDocumentView(prev, this.props.DocumentView?.())?.select(false); } return true; @@ -271,7 +271,7 @@ export class CollectionTreeView extends CollectionSubView<Partial<collectionTree this, this, this.doc, - this.props.DataDoc, + this.props.TemplateDataDocument, undefined, undefined, addDoc, @@ -326,7 +326,7 @@ export class CollectionTreeView extends CollectionSubView<Partial<collectionTree <div className="buttonMenu-docBtn" style={{ width: NumCast(menuDoc._width, 30), height: NumCast(menuDoc._height, 30) }}> <DocumentView Document={menuDoc} - DataDoc={menuDoc} + TemplateDataDocument={menuDoc} isContentActive={this.props.isContentActive} isDocumentActive={returnTrue} addDocument={this.props.addDocument} |
