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

[data grid] Changing pagesize to All ({value: -1, label: "All"}) doesn't reset page parameter #16664

Open
HasanMothaffar opened this issue Feb 20, 2025 · 1 comment
Labels
bug 🐛 Something doesn't work component: data grid This is the name of the generic UI component, not the React module!

Comments

@HasanMothaffar
Copy link

HasanMothaffar commented Feb 20, 2025

Steps to reproduce

Steps:

  1. Open this link to live example: https://codesandbox.io/p/sandbox/charming-bassi-ctk3yx
  2. Navigate through pages (click on next page button in datagrid). One navigation is enough to reproduce
  3. Change pagesize to All

This thing can also be noted here https://mui.com/x/react-data-grid/pagination/#server-side-pagination.

If I change pageSizeOptions to the ones found in the sandbox, the same

Current behavior

Page parameter is not reset and no data is displayed

Expected behavior

Reset page parameter to 1 and display all rows

Context

No response

Your environment

No response

Search keywords: pagination, pagesize, all, value: -1

@HasanMothaffar HasanMothaffar added bug 🐛 Something doesn't work status: waiting for maintainer These issues haven't been looked at yet by a maintainer labels Feb 20, 2025
@github-actions github-actions bot added the component: data grid This is the name of the generic UI component, not the React module! label Feb 20, 2025
@HasanMothaffar HasanMothaffar changed the title Changing datagrid pagesize to All (`{value: -1, label: "All"}) doesn't reset page parameter in datagrid Changing datagrid pagesize to All ({value: -1, label: "All"}) doesn't reset page parameter in datagrid Feb 20, 2025
@michelengelen
Copy link
Member

This has already been fixed in #16485 but was not backported to v7.
I'll create a cherry pick so that it can be released as a fix to this in the v7 as well.

@michelengelen michelengelen changed the title Changing datagrid pagesize to All ({value: -1, label: "All"}) doesn't reset page parameter in datagrid [data grid] Changing pagesize to All ({value: -1, label: "All"}) doesn't reset page parameter Feb 20, 2025
@michelengelen michelengelen removed the status: waiting for maintainer These issues haven't been looked at yet by a maintainer label Feb 20, 2025
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

No branches or pull requests

2 participants