icflorescu / mantine-datatable

The table component for your Mantine data-rich applications, supporting asynchronous data loading, column sorting, custom cell data rendering, context menus, nesting, Gmail-style batch row selection, dark theme, and more.
https://icflorescu.github.io/mantine-datatable/
MIT License
949 stars 68 forks source link

Change Page Size (onRecordsPerPageChange) #615

Closed mgreenw closed 4 months ago

mgreenw commented 4 months ago

Describe the solution you'd like Similar to onPageChange, it would be awesome if it were possible to update the number of records per page by supplying a onRecordsPerPageChange param that was called when you update the records per page. This would most likely be a component to handle this myself

Additional context See https://ant.design/components/pagination#components-pagination-demo-changer for an example.

muhammedaksam commented 4 months ago

Describe the solution you'd like Similar to onPageChange, it would be awesome if it were possible to update the number of records per page by supplying a onRecordsPerPageChange param that was called when you update the records per page. This would most likely be a with default options of 10, 20, 50, and 100 (customizable via other props). Describe alternatives you've considered Using paginationText to render a component to handle this myself

Additional context See https://ant.design/components/pagination#components-pagination-demo-changer for an example.

Isn't onRecordsPerPageChange already exist on https://icflorescu.github.io/mantine-datatable/examples/pagination/#displaying-a-page-size-selector or am I missing something?

mgreenw commented 4 months ago

Oi, missed that in the docs. Thanks!