diff options
| author | bobzel <zzzman@gmail.com> | 2023-10-12 11:24:19 -0400 |
|---|---|---|
| committer | bobzel <zzzman@gmail.com> | 2023-10-12 11:24:19 -0400 |
| commit | 53d456afb43b70cc240bc6a37094fa37cfe37436 (patch) | |
| tree | 1c45b91992e766da36a92ae652aa7ebe122ff664 /src/client/views/collections/CollectionSubView.tsx | |
| parent | 54e80f26df04f1a031d1d7e4b840fe9426d4d2cf (diff) | |
performance fixes to reduce re-rendering : moved link brushing out of Doc's highlighting and into Annotation.tsx, stopped freeformview from rerendering whenever its invalidated by not always setting layoutElements to a new list.
Diffstat (limited to 'src/client/views/collections/CollectionSubView.tsx')
| -rw-r--r-- | src/client/views/collections/CollectionSubView.tsx | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/client/views/collections/CollectionSubView.tsx b/src/client/views/collections/CollectionSubView.tsx index 158f9d8ee..011bc1de5 100644 --- a/src/client/views/collections/CollectionSubView.tsx +++ b/src/client/views/collections/CollectionSubView.tsx @@ -67,7 +67,7 @@ export function CollectionSubView<X>(moreProps?: X) { return this.layoutDoc[this.props.fieldKey]; } - get childLayoutPairs(): { layout: Doc; data: Doc }[] { + @computed get childLayoutPairs(): { layout: Doc; data: Doc }[] { const { Document, DataDoc } = this.props; const validPairs = this.childDocs .map(doc => Doc.GetLayoutDataDocPair(Document, !this.props.isAnnotationOverlay ? DataDoc : undefined, doc)) @@ -77,7 +77,7 @@ export function CollectionSubView<X>(moreProps?: X) { }); return validPairs.map(({ data, layout }) => ({ data: data as Doc, layout: layout! })); // this mapping is a bit of a hack to coerce types } - get childDocList() { + @computed get childDocList() { return Cast(this.dataField, listSpec(Doc)); } collectionFilters = () => this._focusFilters ?? StrListCast(this.props.Document._childFilters); |
