[data grid] Broken calculation and display with { value: -1, label: 'All', }
pagesize option
#11724
Labels
bug 🐛
Something doesn't work
component: data grid
This is the name of the generic UI component, not the React module!
feature: Pagination
Related to the data grid Pagination feature
Steps to reproduce
Link to live example: (required)
Datagrid condesandbox
Steps:
Current behavior
text of the displayed rows is wrong, it says "100001–100000 of 100000" and is enabling the go to previous page button in the navigation
Error in console
Expected behavior
text of the displayed rows should say "1–100000 of 100000" and all the buttons in the pagination should be disabled
Documentation says
It works perfectly if instead of
-1
as the value for the ALL options we use the total number of items.Like in this codesanbox
Context
We are trying to have an option in "Results per page" select to display all the rows.
Your environment
npx @mui/envinfo
System:
OS: macOS 14.2.1
Binaries:
Node: 18.18.0 - ~/.nvm/versions/node/v18.18.0/bin/node
npm: 9.8.1 - ~/.nvm/versions/node/v18.18.0/bin/npm
pnpm: 8.14.1 - ~/.nvm/versions/node/v18.18.0/bin/pnpm
Browsers:
Chrome: 120.0.6099.234
Edge: Not Found
Safari: 17.2.1
npmPackages:
@emotion/react: ^11.11.0 => 11.11.0
@emotion/styled: ^11.11.0 => 11.11.0
@mui/base: ^5.0.0-beta.4 => 5.0.0-beta.4
@mui/core-downloads-tracker: 5.14.11
@mui/icons-material: ^5.11.16 => 5.11.16
@mui/material: ^5.13.2 => 5.14.11
@mui/private-theming: 5.14.11
@mui/styled-engine: 5.14.11
@mui/system: 5.14.11
@mui/types: 7.2.4
@mui/utils: 5.14.11
@mui/x-data-grid: 6.18.6
@mui/x-data-grid-premium: ^6.18.6 => 6.18.6
@mui/x-data-grid-pro: 6.18.6
@mui/x-license-pro: 6.10.2
@types/react: ^18.2.24 => 18.2.24
react: ^18.2.0 => 18.2.0
react-dom: ^18.2.0 => 18.2.0
styled-components: ^6.1.1 => 6.1.8
typescript: ~5.0.2 => 5.0.4
Chrome
Search keywords: datagrid pageSizeOptions
The text was updated successfully, but these errors were encountered: