From a41e26e4c6668198a15ea0e74425c71634d66ddb Mon Sep 17 00:00:00 2001 From: advplyr Date: Fri, 1 Jul 2022 17:01:40 -0500 Subject: [PATCH] Fix:Fetch more library items per request to fill screen size #265 --- components/bookshelf/LazyBookshelf.vue | 3 +++ 1 file changed, 3 insertions(+) diff --git a/components/bookshelf/LazyBookshelf.vue b/components/bookshelf/LazyBookshelf.vue index 85e2dd1e..a97f5e6a 100644 --- a/components/bookshelf/LazyBookshelf.vue +++ b/components/bookshelf/LazyBookshelf.vue @@ -302,6 +302,9 @@ export default { this.shelvesPerPage = Math.ceil(this.bookshelfHeight / this.shelfHeight) + 2 this.bookshelfMarginLeft = (this.bookshelfWidth - this.entitiesPerShelf * this.totalEntityCardWidth) / 2 + const entitiesPerPage = this.shelvesPerPage * this.entitiesPerShelf + this.booksPerFetch = Math.ceil(entitiesPerPage / 20) * 20 // Round up to the nearest 20 + if (this.totalEntities) { this.totalShelves = Math.ceil(this.totalEntities / this.entitiesPerShelf) }