Skip to content
New issue

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

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

Already on GitHub? # to your account

PageRangeDisplayed=2 not working when first page is selected #307

Closed
miestr opened this issue May 7, 2020 · 3 comments
Closed

PageRangeDisplayed=2 not working when first page is selected #307

miestr opened this issue May 7, 2020 · 3 comments

Comments

@miestr
Copy link

miestr commented May 7, 2020

My setup: total 12 pages

 pageRangeDisplayed={2}
marginPagesDisplayed={1}

This means that margin pages 1 and 12 (1 per margin) are always displayed, and when I am on page 7, I get neighbour pages 6 and 8 (2 buttons in range, 1 per side) offered - this is correct.
valid
But when I am on page 1, I expect pages 1, 2 and 12 to be offered.
expectedResult

However, I get pages 1, 2, 3 and 12. Why? Page number 3 shal be out out of my range. Neighbours for page 1 are buttons 0 and 2, but as pase 0 does not exist, I shall only get the page on the right (so page number 2).
invalidResult

Basically, this is confusing from UX perspective, because if I am on page number 1, I want to navigate either to the page next to it, or may be to the last one. But not the page number 3.
How to achieve such a behaviour?

@AXV1140
Copy link

AXV1140 commented Jul 27, 2020

any solution for this

@MonsieurV
Copy link
Collaborator

This should be fixed by #363.

Could someone validate this works for them?

To install from GitHub master:

npm install --save github:AdeleD/react-paginate#master

Thanks for the reports!

@AdeleD If you see this message, I think we could release the v7.2.0 (I didn't tag atm)

@AdeleD
Copy link
Owner

AdeleD commented Nov 7, 2021

FYI I've just published v8.0.0

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

No branches or pull requests

4 participants