Skip to content

Commit 2e11f11

Browse files
authored
Merge pull request #590 from BloomBooks/showMoreBookCounts
Show book counts when the query results are accurate (BL-14994)
2 parents 3d90a05 + 5a909c8 commit 2e11f11

1 file changed

Lines changed: 7 additions & 0 deletions

File tree

src/components/BookCardGroup.tsx

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -161,6 +161,13 @@ const BookCardGroupInner: React.FunctionComponent<IProps> = (props) => {
161161
if (search.totalMatchingRecords < maxCardsToRetrieve) {
162162
countToShow = books.length;
163163
}
164+
// If we don't have either kind of secondary filter, we can just show the number that the query results indicate.
165+
if (
166+
!props.collection.secondaryFilter &&
167+
!props.collection.duplicateBookFilterName
168+
) {
169+
countToShow = search.totalMatchingRecords;
170+
}
164171

165172
// As of 11/2021, this skip stuff is not really being used. In theory it would all still work if
166173
// anything initiated the skipping. But our more cards now just loads the whole (filtered) collection.

0 commit comments

Comments
 (0)