Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow selecting pagesize in Pagination #3164

Open
yusijs opened this issue Nov 29, 2023 · 0 comments
Open

Allow selecting pagesize in Pagination #3164

yusijs opened this issue Nov 29, 2023 · 0 comments

Comments

@yusijs
Copy link
Contributor

yusijs commented Nov 29, 2023

Is your feature request related to a problem? Please describe.

Most of our APIs allows us to set a pagesize we want returned, but the Pagination component doesn't have this functionality built into it. While we can set it from the outside, it makes the process less seamless, as users would look for this possibility in the same space where you change page etc.

Describe the solution you'd like

Ideally I would like something similar to what Material UI has implemented in their TablePagination and the Angular team implemented in the material paginator, which allows for this be configured rather seamlessly.

Something like this would be ideal I think:

<Pagination
  itemsPerPage={10}
  itemPerPageOptions={[10, 25, 50, 100]}
  onItemPerPageChange={..}
  totalItems={40}
/>

where if itemPerPageOptions is not defined, the selector is just hidden away.

Describe alternatives you've considered

Adding a pagesize-selector outside of the Pagination component, but as described above this is less seamless.

Additional context

image

image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants