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

Allow currentPage to be greater than totalPages #14

Open
ezhlobo opened this issue Feb 13, 2018 · 2 comments
Open

Allow currentPage to be greater than totalPages #14

ezhlobo opened this issue Feb 13, 2018 · 2 comments

Comments

@ezhlobo
Copy link

ezhlobo commented Feb 13, 2018

Now users can type currentPage in URL while totalPages is a constant. What's the best way to handle it in our application?

I was expecting that this plugin will handle it for me... We can always render pagination like when currentPage is 1 but pass isActive=false to each component.

@dmytroyarmak
Copy link
Contributor

hey @ezhlobo

Unfortunately, this library expects values that are passed to be valid and it doesn't support situation when currentPage is greater than totalPages.

But now I think it shouldn't be so strict since throwing errors is not an optimal solution for this problem :)

I'll update this issue when this behavior will be improved.

@ezhlobo
Copy link
Author

ezhlobo commented Feb 16, 2018

@dmytroyarmak the perfect way to handle that is to just render everything as is when isActive is set to false in each component. But I'm fine with any solution which does not throw an exception.

This is my opinion, but just in case you don't have any objection to it ;). Thank you for the response anyway!

PS. when you decide something could you capture it here before implementing. I'll probably will be able to help you with this issue (or maybe anyone else).

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

No branches or pull requests

2 participants