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

feat(Pagination): ellipsis should separate at least 2 pages #647

Conversation

andreww2012
Copy link
Contributor

Hello!

Rendering an ellipsis in the Pagination component when it only put instead of a single page item is not that useful I think:

This PR changes this behavior by requiring the difference between pages that ellipsis separate be at least 2.

@zernonia
Copy link
Member

zernonia commented Feb 1, 2024

Hey @andreww2012 .. Not sure what you are looking for.. have you tried changing siblingCount to 5?

@andreww2012
Copy link
Contributor Author

Hey @zernonia!

I don't think this is related to siblingCount (and I need to use 1 anyway).

On the screenshot (taken directly from the radix-vue site), "..." is put between pages 1 and 3, but it can just be replaced with "2". Same happens on the right side, in the end of the list. This PR changes exactly that 🙂

Other UI libs handle this case, for example:

Copy link
Member

@zernonia zernonia left a comment

Choose a reason for hiding this comment

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

LGTM! Thanks for the suggestion and changes @andreww2012 !

@zernonia zernonia merged commit db923ef into radix-vue:main Feb 1, 2024
2 checks passed
@andreww2012
Copy link
Contributor Author

I was about to make necessary changes in tests this evening, but you beat me. Thank you for that & merging! :)

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

Successfully merging this pull request may close these issues.

None yet

2 participants