[data grid] pagination has unexpected behavior using -1 for "All" rows per page #16431
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
good first issue
Great for first contributions. Enable to learn the contribution process.
Steps to reproduce
Steps:
Current behavior
In the example above, the rows disappear from table.
I have seen other behavior too selecting All when it's set to -1, such as the table showing a misc subset of rows, or showing the proper row count - 1.
Expected behavior
All of the rows should be shown in the table. My solution was to use the length of the rows array instead of -1 for "All".
Context
I was trying to display a dynamic setting for all rows without having to calculate it. For that purpose, it would be nice if displaying the "All" option was just a grid prop, e.g. allowAllRows, and was computed using the length of the
rows
array passed to the table. Maybe there's a limitation I don't know about though.Your environment
N/A, bug is visible in docs example
Search keywords: data-grid page pagination all rows
The text was updated successfully, but these errors were encountered: