-
-
Notifications
You must be signed in to change notification settings - Fork 386
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
Pagination is broken if there is only one page #1048
Labels
Milestone
Comments
I think maybe this needs to be currentPage < 1 also For this
we wouldn't want them to be able to click previous if no pages are available |
Agreed, but this doesn't mean we do not show the pages, even if its just one. |
Mukilan1600
added a commit
to Mukilan1600/flowbite-react
that referenced
this issue
Jan 21, 2024
When there is only 1 page the page number is not shown, instead only the disabled buttons are shown. The correct behaviour is to show the active page number (1) and have the buttons disabled. fix themesberg#1048
@tulup-conner I've raised a PR to fix this |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
Steps to reproduce
Current behavior
There is no
1
between the arrows, just two buttons (previous and next)Expected behavior
1
is shown between the arrows, similarly to the case when we have 2 and more pages.Context
I would like to show the
Pagination
component with only one page when user has a small amount of data.The problem is in
range
function, where this check is containedI would assume it should be
but not sure whether this breaks the expected behaviour from your side. If you are fine I can create the PR.
Thanks,
Sergii
The text was updated successfully, but these errors were encountered: