[DataGrid] Pagination is 1-based but should be 0-based #852
Labels
breaking change
component: data grid
This is the name of the generic UI component, not the React module!
Milestone
Current Behavior 😯
The pagination is 1-based.
Expected Behavior 🤔
The pagination is 0-based.
Steps to Reproduce 🕹
Steps:
Context 🔦
Pagination
component, which is meant for SEO starts at page 1. This is simpler for mapping with the URL: (?page=2
).TablePagination
component which is meant for data grid use cases starts at page 0: https://material-ui.com/components/pagination/#table-pagination. This is simpler to match with the default index of JavaScript arrays.I believe it would make more sense for the data grid to match
TablePagination
rather thanPagination
. It also seems to be a common convention: ag-Grid is 0-based, and react-table is 0-based too. However, I haven't look further than these two comparison points.It might be related to #685.
Your Environment 🌎
`npx @material-ui/envinfo`
The text was updated successfully, but these errors were encountered: