There is some issue with showing the last 3 pages for the pagination when there is some overlap between what is shown in the middle. See steps to reproduce and screen shot.
To Reproduce
Steps to reproduce the behavior:
Go to 'Pagination Usage 2'
Update the total to 10.
Click "Next" 4 times, so page 5 is selected
See that pages 1, 2, 3, 4, 5, 6, 7 are show, 8, 9 10 are missing
Expected behavior
In this case I'd want to see all 10 pages because: we show at least the first 3, We show +-2 for the current page and we show at least the last 3 pages. So in this case it'd be: 1,2,3 - 3,4,5,6,7 - 8,9,10
It's kind of weird, but right now it's not correct.
Screenshots
Environment (please complete the following information):
yarn dev
os x
Describe the bug
There is some issue with showing the last 3 pages for the pagination when there is some overlap between what is shown in the middle. See steps to reproduce and screen shot.
To Reproduce Steps to reproduce the behavior:
Expected behavior In this case I'd want to see all 10 pages because: we show at least the first 3, We show +-2 for the current page and we show at least the last 3 pages. So in this case it'd be: 1,2,3 - 3,4,5,6,7 - 8,9,10
It's kind of weird, but right now it's not correct.
Screenshots
Environment (please complete the following information): yarn dev os x
extra context The issues seems to be here https://github.com/cisco-sbg-ui/atomic-react/blob/master/framework/components/APagination/APagination.js#L191,L204
I can fix, but unsure how to test, should I just make more "usage N" things and use cypress, or is there a unit test framework.