Repository navigation
Fix pagination footer total under manual pagination - #678
Merged
fantkolja merged 2 commits intoSep 29, 2026
Merged
Conversation
Table always computed the "X - Y of Z" pagination footer from data.length, even with manualPagination, where data is just the current page's rows - so a partial page (e.g. the last one) showed its own row count as the grand total instead of the real one. Adds an optional totalCount prop that overrides this when provided, falling back to data.length otherwise. Forward-port of the same fix from v3 (#676).
fantkolja
approved these changes
Sep 24, 2026
fantkolja
deleted the
fix/table-manual-pagination-total-count-master
branch
September 29, 2026 15:01
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.
Summary
Tablealways computed the pagination footer's "X - Y of Z" total fromdata.length, even undermanualPagination, wheredatais just the current page's rows — so a partial page (e.g. the last one) showed its own row count as the grand total instead of the real one.totalCountprop onTablethat overrides the footer's total when provided, falling back todata.lengthotherwise (no behavior change for existing consumers).v3line.Found while building server-driven pagination for a listing page in
management-center.Test plan
npm test— full suite passes (75 suites, 474 tests)npm run lint— cleannpm run compile— clean buildTable.test.tsxcovering thetotalCountoverride and thedata.lengthfallback; verified both fail without the fix and pass with it