Skip to content

MRT Table Pagination Issue After Filtering #1393

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
1 task done
KesavaSubhash opened this issue Mar 20, 2025 · 0 comments
Open
1 task done

MRT Table Pagination Issue After Filtering #1393

KesavaSubhash opened this issue Mar 20, 2025 · 0 comments

Comments

@KesavaSubhash
Copy link

KesavaSubhash commented Mar 20, 2025

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.
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

No branches or pull requests

1 participant