aboutsummaryrefslogtreecommitdiff
path: root/src/client/views/collections/CollectionCardDeckView.tsx
diff options
context:
space:
mode:
authorbobzel <zzzman@gmail.com>2024-09-17 21:02:35 -0400
committerbobzel <zzzman@gmail.com>2024-09-17 21:02:35 -0400
commitbde7bd192b1a81e3fd1c4ead13e821b95b42f3cf (patch)
tree0273d154bcfadb6aa0b7b28955a670e9500fdbca /src/client/views/collections/CollectionCardDeckView.tsx
parent893a7cb517490ad5fc1f4737ff610779a57fdee7 (diff)
updating packages and more cleanup of cardview merge
Diffstat (limited to 'src/client/views/collections/CollectionCardDeckView.tsx')
-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>
);