gregnb / gregnb/mui-datatables
number of rows per page unknown
- Dominant language
- JavaScript
- Stars
- 2.7k
- Forks
- 906
- PR merge metrics
- No merged PRs in 30d
Description
In a situation where I have number of rows equal to 14 and limit per page of 10. The next page has no results
(count -1 and serverside true, only works for next page but not previous because it is inactive)
https://codesandbox.io/s/mui-datatables-server-side-pagination-with-unknown-number-of-items-forked-nwv7z8?file=/src/App.js
AND
`viewColumns: false, filter: false, responsive: 'standard', selectableRowsOnClick: true, selectableRows: 'single', serverSide: true, page: pageOffset, rowsPerPage: dataCount, rowsPerPageOptions: [dataCount, 20, 30], count: dataCount,`
`onChangePage:(currentPage: number) => { setPageOffset(currentPage); }, onChangeRowsPerPage:(numberOfRows: number) => { setPageLimit(numberOfRows); }`
| Tech | Version |
|--------------|---------|
| Material-UI | 5.10.10 |
| MUI-datatables | 3.7.9 |
| React | 18.2.0 |
Contributor guide
No contributing guide indexed for this repository
Research direction
Start with the linked CodeSandbox reproduction and the server-side pagination configuration, focusing on count -1 with 14 rows and a limit of 10. Verify the next- and previous-page behavior and the page and rows-per-page callbacks; done means pagination shows the correct available navigation and results without an empty next page.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript, react
- Domain
- frontend
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 38/100