You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When both boundaryCount and siblingCount are zero, the pagination body currently contains the current page plus start and end ellipses. Those ellipses do not expose any page and make the opt-in compact configuration wider than necessary.
This uses the compact behavior proposed in the issue when both counts are zero and the normal output would contain an ellipsis. Empty or invalid ranges and small page counts that already fit continue through the existing item generation, preserving valid and reachable page items.
Tests:
pnpm test:unit packages/mui-material/src/usePagination/usePagination.test.js packages/mui-material/src/Pagination/Pagination.test.js --run (94 passed, 6 skipped across Node and Chromium)
Full @mui/material unit run after the upstream tests merged: 8,720 passed and 838 skipped. Two unrelated Select timing tests failed, and four browser files hit runner import timeouts; focused reruns passed 6/6 and 204/204 respectively.
Addressed the new #49118 coverage. The compact path now applies only when the current page is valid and the normal zero-boundary/zero-sibling output would contain an ellipsis. Empty/invalid ranges and small counts continue through the established range generation, so the new validity and reachability checks pass. I intentionally updated the count=4 expectation to the compact previous/current/next output. Local validation: focused Pagination suites 94 passed/6 skipped across Node and Chromium; ESLint, Prettier, package TypeScript, and the 18-project release build pass. The full Material UI run reached 8,720 passes; its two Select timing failures and browser import timeouts all passed on focused reruns (6/6 and 204/204).
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
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.
Closes #24749
When both
boundaryCountandsiblingCountare zero, the pagination body currently contains the current page plus start and end ellipses. Those ellipses do not expose any page and make the opt-in compact configuration wider than necessary.This uses the compact behavior proposed in the issue when both counts are zero and the normal output would contain an ellipsis. Empty or invalid ranges and small page counts that already fit continue through the existing item generation, preserving valid and reachable page items.
Tests:
pnpm test:unit packages/mui-material/src/usePagination/usePagination.test.js packages/mui-material/src/Pagination/Pagination.test.js --run(94 passed, 6 skipped across Node and Chromium)pnpm exec eslint packages/mui-material/src/usePagination/usePagination.js packages/mui-material/src/usePagination/usePagination.test.jspnpm exec prettier --check packages/mui-material/src/usePagination/usePagination.js packages/mui-material/src/usePagination/usePagination.test.jspnpm -F @mui/material typescriptpnpm release:build@mui/materialunit run after the upstream tests merged: 8,720 passed and 838 skipped. Two unrelated Select timing tests failed, and four browser files hit runner import timeouts; focused reruns passed 6/6 and 204/204 respectively.