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

onPageChange handler doesn't update page query param correctly. #45

Open
srallen opened this issue Oct 30, 2017 · 1 comment
Open

onPageChange handler doesn't update page query param correctly. #45

srallen opened this issue Oct 30, 2017 · 1 comment

Comments

@srallen
Copy link
Contributor

srallen commented Oct 30, 2017

When hitting next on page one of a resource that has two pages of results updates the param to 11 instead of 2.

@srallen
Copy link
Contributor Author

srallen commented Oct 31, 2017

So this issue comes up when you pass the incorrect prop type for the page prop. I was passing it the page value from the params object instead of from the metadata of the resource. From the params object, page is a string, whereas from the metadata object is is a number. If the wrong prop type is passed, we should include a console log warning to explain this as well as put a note into the docs.

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

No branches or pull requests

1 participant