Skip to content

MRT Table Pagination Issue After Filtering #1393

Open
@KesavaSubhash

Description

@KesavaSubhash

material-react-table version

v3

react & react-dom versions

v17

Describe the bug and the steps to reproduce it

Issue Description:
I encountered a pagination issue while using the MRT (Material React Table)-Manage Pagination State . When applying a filter using the value as 94 at phone number column on a dataset of 200 records, the table correctly filters the data down to 26 records. However, the table remains on Page 3 instead of resetting to Page 1, causing confusion and requiring manual navigation.

Expected Behavior:
Upon filtering, the table should automatically navigate to Page 1 instead of retaining the previous page index.

Steps to Reproduce:

  1. Load a dataset with 100 records.
  2. Navigate to Page 3 or any other page.
  3. Apply a filter that reduces the record count (e.g., from 100 to 30).
  4. The table remains on Page 3, even though only 30 records exist.

Minimal, Reproducible Example - (Optional, but Recommended)

useEffect(() => {
setPagination((prev) => ({ ...prev, pageIndex: 0 }));
}, [filters]);

Screenshots or Videos (Optional)

Image

Image

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