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

Ability to disable next/last when we are on the last page #18

Open
PaulInglis opened this issue Mar 7, 2018 · 1 comment
Open

Ability to disable next/last when we are on the last page #18

PaulInglis opened this issue Mar 7, 2018 · 1 comment

Comments

@PaulInglis
Copy link

I'd like to be able to disable the 'next page' link and 'last page' link when the user gets to the last page.

Currently I can do this with first and previous by checking that the value is 1, but there is no way to check if it's the last page.
I would suggest passing the totalPages in with the props, or updating the isDisabled prop for that component.

@dmytroyarmak
Copy link
Contributor

Hi @PaulInglis
You should be able to do it by using isActive property. On the last page, it should be "true" for the next button and on the first page - for the previous button.

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