Skip to content
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

Paging resets when serverside search and change page #762

Closed
Avd6977 opened this issue Jul 10, 2019 · 2 comments
Closed

Paging resets when serverside search and change page #762

Avd6977 opened this issue Jul 10, 2019 · 2 comments
Labels

Comments

@Avd6977
Copy link
Contributor

Avd6977 commented Jul 10, 2019

Expected Behavior

Page passed in as prop should be taken

Current Behavior

Page prop is ignored when search is not null. This disables paging when search exists and done serverside with table reload

Steps to Reproduce (for bugs)

  1. Set serverside true and maintain state
  2. Search for a value
  3. Select Next Page
  4. Page stays at 0

Your Environment

Tech Version
MUI-datatables 2.6.1
Avd6977 pushed a commit to Avd6977/mui-datatables that referenced this issue Jul 10, 2019
@Avd6977 Avd6977 mentioned this issue Jul 10, 2019
@gabrielliwerant
Copy link
Collaborator

Thanks for finding this, there is a bug here, but it's a bit more subtle than it appears. We definitely need to override the page value the first time a search is entered. However, in subsequent page updates, we should allow the page to change. I put some notes in the PR. It's possible there won't be a fix without a state refactor overhaul for the whole table. :(

gabrielliwerant pushed a commit that referenced this issue Aug 9, 2019
* Fix to not resest page when props has page

#762
#762

* Switching to serverSide instead of page to keep client side working the same way
@gabrielliwerant
Copy link
Collaborator

Should be resolved in 2.8.0.

SkyCaptainess added a commit to SkyCaptainess/Material-UI-datatables that referenced this issue May 21, 2023
* Fix to not resest page when props has page

#762
gregnb/mui-datatables#762

* Switching to serverSide instead of page to keep client side working the same way
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants