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

Add <PaginationPrevNext> component #2926

Merged
merged 5 commits into from
Aug 29, 2024
Merged

Add <PaginationPrevNext> component #2926

merged 5 commits into from
Aug 29, 2024

Conversation

balanza
Copy link
Member

@balanza balanza commented Aug 28, 2024

Description

Add a variant to the <Pagination> component that only has [<] [>] buttons. The component accepts the following properties

property description
hasPrev When false, the [<] button is not clickable. Default: true
hasNext When false, the [>] button is not clickable. Default: true
onSelect Execute with string argument prev when clicking on [<], with next when clicking on [>]

It also accepts properties configuring the items-per-page dropdown as in the <Pagination> component.

This PR refactors the <Pagination> component, too. See the commit list for detailed changes.

@balanza balanza requested review from janvhs and gagandeepb August 28, 2024 04:42
Copy link
Member

@janvhs janvhs left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this is so much cleaner. Thank you fir refactoring this 🙏🏼

@balanza balanza force-pushed the nextprev-pagination branch from 28f4022 to b068773 Compare August 29, 2024 09:18
@balanza balanza requested a review from janvhs August 29, 2024 09:23
@balanza balanza merged commit 10bffa1 into main Aug 29, 2024
30 checks passed
@balanza balanza deleted the nextprev-pagination branch August 29, 2024 11:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

3 participants