aboutsummaryrefslogtreecommitdiff
path: root/src/client/views/collections/collectionLinear
diff options
context:
space:
mode:
authorbobzel <zzzman@gmail.com>2023-04-27 16:45:59 -0400
committerbobzel <zzzman@gmail.com>2023-04-27 16:45:59 -0400
commitba5b687011526188bb024ddf37c254aaf285c06d (patch)
tree47df4f82053066d75ed32683375c2bb965be35d5 /src/client/views/collections/collectionLinear
parentb82a909a63a6de414d075735453240ebc02f5aa3 (diff)
performance tuning for schema views to avoid re-rendering each table cell when child docs change.
Diffstat (limited to 'src/client/views/collections/collectionLinear')
-rw-r--r--src/client/views/collections/collectionLinear/CollectionLinearView.tsx20
1 files changed, 11 insertions, 9 deletions
diff --git a/src/client/views/collections/collectionLinear/CollectionLinearView.tsx b/src/client/views/collections/collectionLinear/CollectionLinearView.tsx
index 97eed7752..efd73a927 100644
--- a/src/client/views/collections/collectionLinear/CollectionLinearView.tsx
+++ b/src/client/views/collections/collectionLinear/CollectionLinearView.tsx
@@ -255,15 +255,17 @@ export class CollectionLinearView extends CollectionSubView() {
})}
/>
- <div
- className="collectionLinearView-content"
- style={{
- height: this.dimension(),
- flexDirection: flexDir as any,
- gap: flexGap,
- }}>
- {this.childLayoutPairs.map(pair => this.getDisplayDoc(pair.layout))}
- </div>
+ {!this.layoutDoc.linearViewIsExpanded ? null : (
+ <div
+ className="collectionLinearView-content"
+ style={{
+ height: this.dimension(),
+ flexDirection: flexDir as any,
+ gap: flexGap,
+ }}>
+ {this.childLayoutPairs.map(pair => this.getDisplayDoc(pair.layout))}
+ </div>
+ )}
</div>
</div>
);