Add a display rows per page dropdown or textbox with pagination
See original GitHub issueIs your feature request related to a problem? Please describe. It would be nice to add a dropdown to select how many rows user wants to show per page like this
Describe the solution you’d like I think the prop recordPerPage should show the dropdown so that both dropdown and page info can be sync
Describe alternatives you’ve considered An alternative can be to add a withLimitDropdown prop to table which if it is true it should show the limit dropdown and get the value from recordsPerPage state
<DataTable
recordsPerPage="10"
withLimitDropdown
/>
Issue Analytics
- State:
- Created a year ago
- Comments:10 (7 by maintainers)
Top Results From Across the Web
add more options in records per page dropdown using ...
Everything is working fine, but now I want to be able to select more than the default options of records per page, by...
Read more >Row Pagination - JavaScript Data Grid
If you set paginationAutoPageSize=true the grid will automatically show as many rows in each page as it can fit. This is demonstrated below....
Read more >Pagination: Let the user choose how many items are shown ...
I'm rewriting an application which had pagination of datagrids and a user configurable "item per page" value. Now the new application only have...
Read more >Add sorting, filtering, and paging - ASP.NET MVC with EF Core
In this tutorial you'll add sorting, filtering, and paging functionality to the Students Index page. You'll also create a page that does ...
Read more >DataTables lengthChange Option - GeeksforGeeks
The lengthChange option is used to specify whether the dropdown to change the number of rows per page is displayed or not.
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
This should work in
v1.7.13
🎉Hi, I have worked on the feature and named the props as you mentioned above. but data types are different for
onRecordsPerPageChange
andrecordsPerPageOptions
they areonRecordsPerPageChange: ((value: string | null) => void) | undefined;
recordsPerPageOptions: string[];
the reason for this is that the select component takes values as a string array
also, I am getting a typescript error if I don’t pass these props to DataTable component. I have made them optional but I don’t know why this error is occurring can you help me with this
theses are some issues I am facing if I can fix these issues then I can submit the PR
also, the Ui is like this