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) }