Skip to content

Commit

Permalink
Merge pull request #3625 from ProjectSidewalk/3621-proper-end-detecti…
Browse files Browse the repository at this point in the history
…on-gallery-expanded

Fix issue in gallery when there's not enough labels to display more than 1 page
  • Loading branch information
misaugstad authored Aug 27, 2024
2 parents 0877361 + 6752f41 commit f8a2f41
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions public/javascripts/Gallery/src/cards/CardContainer.js
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,7 @@ function CardContainer(uiCardContainer, initialFilters) {
// Grab first batch of labels to show.
fetchLabels(labelTypeIds[currentLabelType], initialLoad, initialFilters.validationOptions, Array.from(loadedLabelIds), initialFilters.neighborhoods, initialFilters.severities, initialFilters.tags, function() {
currentCards = cardsByType[currentLabelType].copy();
lastPage = currentCards.getCards().length <= currentPage * cardsPerPage;
render();
});
// Creates the Modal object in the DOM element currently present.
Expand Down

0 comments on commit f8a2f41

Please sign in to comment.