Skip to content

Conversation

SobiyaChainee
Copy link
Collaborator

@SobiyaChainee SobiyaChainee commented Jul 7, 2025

Description / Motivation

Changed the calculation of the TotalPages property and improves logic in the DirectoryViewModel.
In previous implementation it added +1 to the total pages regardless of the division remainder. it's causing an extra empty page to appear when TotalResults was divisible by PageSize.

How Has This Been Tested?

Manually verified pagination display with different TotalResults values.

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)

Checklist:

  • I have read the Contributing guide.
  • My code/comments/docs fully adhere to the Code of Conduct.
  • My change is a code change.
  • My change is a documentation change and there are NO other updates required.

Closes #513

@robearlam robearlam merged commit b0e7b50 into Sitecore:main Jul 7, 2025
2 of 3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Pagination is off
2 participants