-
Notifications
You must be signed in to change notification settings - Fork 625
Added flag to enable 1-indexed pagination structure. #224
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
Conversation
| }, | ||
| "jest": { | ||
| "verbose": true, | ||
| "testURL": "http://localhost/", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Tests were failing. After looking into Jest repo/community, this is what the recommendation was.
This might also fix other PRs like #223
| } = this.props; | ||
| if (hrefBuilder && | ||
| pageIndex !== this.state.selected && | ||
| pageIndex >= 0 && |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Shouldn't that be pageIndex >= (oneIndexed ? 1 : 0) as well?
This fixes the issues #207, #167 by giving the user an option to have its pagination 0-indexed or 1-indexed.
Edit: adding issue