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

Hide pagination if items are less than itemsCountPerPage #18

Closed
epozsh opened this issue Jan 13, 2017 · 4 comments
Closed

Hide pagination if items are less than itemsCountPerPage #18

epozsh opened this issue Jan 13, 2017 · 4 comments

Comments

@epozsh
Copy link

epozsh commented Jan 13, 2017

In version 2.0.1 the pagination is hiding if items<itemsCountPerPage, but in 2.0.2 it is showing unclikable pagination? Is this bug?

@wwwaiser
Copy link
Owner

Hi, yes, seems it's a bug. Feel free to create PR, or i will fix it next week

@wwwaiser
Copy link
Owner

wwwaiser commented Jan 14, 2017

@Shadowman4205 as quick fix you can pass hideDisabled property to component

<Pagination hideDisabled={itemsCountPerPage > totalItemsCount ? false: true } {...props} />

@epozsh
Copy link
Author

epozsh commented Jan 14, 2017

@vayser Thank you very much!

@wagoid
Copy link
Collaborator

wagoid commented Feb 4, 2017

Actually it is a feature. You just need to set hideDisabled prop to true.
When setting hideDisabled to false, it will add a disabled class to the li, when setting to true, it will not render the element, as in the previous behavior.
I think the best solution should be setting hideDisabled default value to true, that way this feature keeps backward compatible.

@epozsh epozsh closed this as completed Feb 7, 2017
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

3 participants