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

[DataGrid] apiRef.setPage is unreliable #229

Closed
2 tasks done
oliviertassinari opened this issue Aug 29, 2020 · 0 comments · Fixed by #284
Closed
2 tasks done

[DataGrid] apiRef.setPage is unreliable #229

oliviertassinari opened this issue Aug 29, 2020 · 0 comments · Fixed by #284
Assignees
Labels
bug 🐛 Something doesn't work component: data grid This is the name of the generic UI component, not the React module!

Comments

@oliviertassinari
Copy link
Member

  • The issue is present in the latest release.
  • I have searched the issues of this repository and believe that this is not a duplicate.

Current Behavior 😯

The active page should be 2.

Expected Behavior 🤔

The active page is 1.

Steps to Reproduce 🕹

Steps:

  1. https://codesandbox.io/s/inspiring-haze-nrfxp?file=/demo.tsx
  2. Observe the rendered page

Context 🔦

This is related to #223 and #190. I believe that we should have a hidden internal state that the imperative API mutates. I haven't looked at what's going on in the implementation.

Your Environment 🌎

Tech Version
Material-UI X v0.1.67
@oliviertassinari oliviertassinari added bug 🐛 Something doesn't work component: data grid This is the name of the generic UI component, not the React module! labels Aug 29, 2020
@dtassone dtassone self-assigned this Sep 14, 2020
dtassone added a commit to dtassone/material-ui-x that referenced this issue Sep 14, 2020
dtassone added a commit to dtassone/material-ui-x that referenced this issue Sep 14, 2020
dtassone added a commit that referenced this issue Sep 15, 2020
* fix #229 setPage not reliable

* fix #228 issue with first page trigger a pageChange event

* Added test for #229

* Apply suggestions from code review

Co-authored-by: Olivier Tassinari <olivier.tassinari@gmail.com>

* move api test to xgrid

* fix prettier

Co-authored-by: Olivier Tassinari <olivier.tassinari@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug 🐛 Something doesn't work component: data grid This is the name of the generic UI component, not the React module!
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants