Skip to content

Selection behavior for table with all data vs. Remote fetching #1498

@xkoryta1

Description

@xkoryta1

material-react-table version

v3.2.1

react & react-dom versions

v17.0.2

Describe the bug and the steps to reproduce it

Bug description:
When using the table with data fetching, the “Select All” checkbox behaves inconsistently across pages. You can see this behavior also in the docs examples.

In a table with all data loaded:

  1. Select a few rows.
  2. Change the page.
  3. The “Select All” checkbox correctly shows the indeterminate state.

In a table with data fetched per page (table was given count of all rows):

  1. Select a few rows.
  2. Change the page.
  3. The “Select All” checkbox state depends on the number of selected rows:
  • If the number of selected rows is equal to or greater than pageSize, the checkbox appears empty (incorrect).
  • If it’s less than pageSize, the checkbox shows the indeterminate state (correct).

Expected behavior:
In both scenarios, the “Select All” checkbox should correctly display the indeterminate state when some but not all rows in the dataset are selected, regardless of pagination or data fetching mode.

It seems that the checkbox state is calculated based on the currently displayed table data and pageSize, while it should be based on the total number of items and pageSize.

Thanks for your response.

Minimal, Reproducible Example - (Optional, but Recommended)

https://www.material-react-table.com/docs/examples/remote

Screenshots or Videos (Optional)

2026-01-05.08-04-40.mp4

Do you intend to try to help solve this bug with your own PR?

None

Terms

  • I understand that if my bug cannot be reliably reproduced in a debuggable environment, it will probably not be fixed and this issue may even be closed.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions