Pagination: fix stale page buttons in windowed layout (T1322291)#34237
Merged
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
Fixes an edge case in the internal pagination “windowed” layout where the sliding page-button window could become stale after pageCount changes (notably when expanding/collapsing groups on the last page), leading to incorrect/duplicated page buttons.
Changes:
- Clamp the sliding window start index to a valid range to prevent stale/overflowing page buttons when
pageCountshrinks/grows (T1322291). - Add Jest unit coverage for the sliding-window behavior across
pageCountchanges. - Add a TestCafe regression test for DataGrid pager consistency when expanding/collapsing a group on the last page.
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
| packages/devextreme/js/__internal/pagination/pages/large.tsx | Adds clamping to keep the windowed pager indexes valid after pageCount changes. |
| packages/devextreme/js/__internal/pagination/tests/pages-large.test.ts | Adds unit tests covering pageCount shrink/expand scenarios that previously produced stale page buttons. |
| e2e/testcafe-devextreme/tests/dataGrid/common/pager.ts | Adds an end-to-end regression test to validate pager stability during group expand/collapse on the last page. |
Alyar666
requested changes
Jul 9, 2026
Alyar666
left a comment
Contributor
There was a problem hiding this comment.
I found an issue that is still reproducible with your fix. I prepared a sample to reproduce it - https://codepen.io/Alyar666-the-styleful/pen/vEgdzJx
79a705e to
59d3956
Compare
Alyar666
approved these changes
Jul 9, 2026
aleksei-semikozov
approved these changes
Jul 9, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.