aboutsummaryrefslogtreecommitdiff
path: root/src/client/views/collections
diff options
context:
space:
mode:
Diffstat (limited to 'src/client/views/collections')
-rw-r--r--src/client/views/collections/CollectionCardDeckView.tsx7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/client/views/collections/CollectionCardDeckView.tsx b/src/client/views/collections/CollectionCardDeckView.tsx
index c029d17c6..97ff852b2 100644
--- a/src/client/views/collections/CollectionCardDeckView.tsx
+++ b/src/client/views/collections/CollectionCardDeckView.tsx
@@ -577,7 +577,8 @@ export class CollectionCardView extends CollectionSubView() {
/**
* Actually renders all the cards
*/
- renderCards = (sortedDocs: Doc[]) => {
+ @computed get renderCards() {
+ const sortedDocs = this.sortedDocs;
const anySelected = this.childDocs.some(doc => DocumentView.SelectedDocs().includes(doc));
const isEmpty = this.childDocsWithoutLinks.length === 0;
const isDesc = BoolCast(this.Document.cardSort_isDesc);
@@ -640,7 +641,7 @@ export class CollectionCardView extends CollectionSubView() {
</div>
);
});
- };
+ }
render() {
const isEmpty = this.childDocsWithoutLinks.length === 0;
@@ -664,7 +665,7 @@ export class CollectionCardView extends CollectionSubView() {
gridAutoRows: `${100 / this.numRows}%`,
}}
onMouseLeave={() => this.setHoveredNodeIndex(-1)}>
- {this.renderCards(this.sortedDocs)}
+ {this.renderCards}
</div>
</div>
);