Skip to content

Pagination: fix stale page buttons in windowed layout (T1322291)#34237

Merged
anna-shakhova merged 2 commits into
DevExpress:mainfrom
anna-shakhova:bugs/T1322291_main
Jul 9, 2026
Merged

Pagination: fix stale page buttons in windowed layout (T1322291)#34237
anna-shakhova merged 2 commits into
DevExpress:mainfrom
anna-shakhova:bugs/T1322291_main

Conversation

@anna-shakhova

Copy link
Copy Markdown
Contributor

No description provided.

@anna-shakhova anna-shakhova self-assigned this Jul 8, 2026
Copilot AI review requested due to automatic review settings July 8, 2026 12:11
@anna-shakhova anna-shakhova requested review from a team as code owners July 8, 2026 12:11

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 pageCount shrinks/grows (T1322291).
  • Add Jest unit coverage for the sliding-window behavior across pageCount changes.
  • 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.

Comment thread e2e/testcafe-devextreme/tests/dataGrid/common/pager.ts
Comment thread packages/devextreme/js/__internal/pagination/pages/large.tsx
@Alyar666 Alyar666 self-requested a review July 9, 2026 07:30

@Alyar666 Alyar666 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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

Comment thread e2e/testcafe-devextreme/tests/dataGrid/common/pager.ts Outdated
Comment thread e2e/testcafe-devextreme/tests/dataGrid/common/pager.ts Outdated
Comment thread e2e/testcafe-devextreme/tests/dataGrid/common/pager.ts Outdated
Comment thread e2e/testcafe-devextreme/tests/dataGrid/common/pager.ts Outdated
Comment thread packages/devextreme/js/__internal/pagination/__tests__/pages-large.test.ts Outdated
Comment thread packages/devextreme/js/__internal/pagination/__tests__/pages-large.test.ts Outdated
Copilot AI review requested due to automatic review settings July 9, 2026 08:55

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 4 out of 4 changed files in this pull request and generated 3 comments.

Comment thread packages/testcafe-models/pagination/index.ts
Comment thread packages/devextreme/js/__internal/pagination/pages/large.tsx
Comment thread e2e/testcafe-devextreme/tests/dataGrid/common/pager.ts
Copilot AI review requested due to automatic review settings July 9, 2026 09:27

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 4 out of 4 changed files in this pull request and generated 1 comment.

Comment thread packages/devextreme/js/__internal/pagination/pages/large.tsx
@anna-shakhova anna-shakhova added this pull request to the merge queue Jul 9, 2026
Merged via the queue into DevExpress:main with commit a88c55a Jul 9, 2026
122 of 124 checks passed
@anna-shakhova anna-shakhova deleted the bugs/T1322291_main branch July 9, 2026 14:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants