Skip to content

Fix pagination footer total under manual pagination - #678

Merged
fantkolja merged 2 commits into
masterfrom
fix/table-manual-pagination-total-count-master
Sep 29, 2026
Merged

fantkolja merged 2 commits into
masterfrom
fix/table-manual-pagination-total-count-master

Conversation

@anatoly-hazelcast

Copy link
Copy Markdown
Contributor

Summary

  • Table always computed the pagination footer's "X - Y of Z" total from data.length, even under 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 on Table that overrides the footer's total when provided, falling back to data.length otherwise (no behavior change for existing consumers).
  • Forward-port of Fix pagination footer total under manual pagination #676, which fixes the same issue on the v3 line.

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 — clean
  • npm run compile — clean build
  • Added two tests in Table.test.tsx covering the totalCount override and the data.length fallback; verified both fail without the fix and pass with it

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).
@anatoly-hazelcast
anatoly-hazelcast requested a review from a team as a code owner September 24, 2026 10:12
@fantkolja
fantkolja merged commit 0b3d719 into master Sep 29, 2026
4 checks passed
@fantkolja
fantkolja deleted the fix/table-manual-pagination-total-count-master branch September 29, 2026 15:01
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.

2 participants