diff options
| author | bobzel <zzzman@gmail.com> | 2021-03-12 17:49:35 -0500 |
|---|---|---|
| committer | bobzel <zzzman@gmail.com> | 2021-03-12 17:49:35 -0500 |
| commit | 2a17392bd461bfdc669961c5bf8892b7cb6958d6 (patch) | |
| tree | 441ca5ae1bdf5f52fe4b06e0a98d19eb5b512149 /src/client/views/collections/CollectionTreeView.tsx | |
| parent | 75194d8218e1747d177ec018e3cf025b8d8906bc (diff) | |
trying to make treeViews more efficient by making fewer calls to Get document fields getter.
Diffstat (limited to 'src/client/views/collections/CollectionTreeView.tsx')
| -rw-r--r-- | src/client/views/collections/CollectionTreeView.tsx | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/client/views/collections/CollectionTreeView.tsx b/src/client/views/collections/CollectionTreeView.tsx index a5194827e..525fa8ca1 100644 --- a/src/client/views/collections/CollectionTreeView.tsx +++ b/src/client/views/collections/CollectionTreeView.tsx @@ -192,7 +192,10 @@ export class CollectionTreeView extends CollectionSubView<Document, Partial<coll /> </div>; } - + @computed get treeViewtruncateTitleWidth() { return NumCast(this.doc.treeViewTruncateTitleWidth, this.panelWidth()); } + truncateTitleWidth = () => this.treeViewtruncateTitleWidth; + @computed get outlineMode() { return this.doc.treeViewType === "outline"; } + @computed get fileSysMode() { return this.doc.treeViewType === "fileSystem"; } onChildClick = () => this.props.onChildClick?.() || ScriptCast(this.doc.onChildClick); whenActiveChanged = (isActive: boolean) => { this.props.whenActiveChanged(this._isChildActive = isActive); }; active = (outsideReaction: boolean | undefined) => this.props.active(outsideReaction) || this._isChildActive; |
