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

Issue with Pagination Shows Total When Table is Empty #719

Closed
jflayhart opened this issue Sep 20, 2016 · 5 comments
Closed

Issue with Pagination Shows Total When Table is Empty #719

jflayhart opened this issue Sep 20, 2016 · 5 comments
Labels

Comments

@jflayhart
Copy link

So it looks like @AllenFang fixed issue #702, however, now we have problems when there is no data in a table like so:

screen shot 2016-09-20 at 5 23 27 pm

@jflayhart
Copy link
Author

jflayhart commented Sep 20, 2016

Looks as if the offending line is: https://github.com/AllenFang/react-bootstrap-table/blob/master/src/pagination/PaginationList.js#L85

I reckon the math is trying something to the effect of (0 - 1) * 25 but then I don't know where the "-24" comes from.

@jflayhart jflayhart changed the title Issue with Pagination Shows Total Issue with Pagination Shows Total When Table is Empty Sep 20, 2016
@AllenFang AllenFang added the bug label Sep 21, 2016
@AllenFang
Copy link
Owner

I'll fix it, thanks this bug report ;)

@AllenFang
Copy link
Owner

Fixed on v2.5.4. Thanks

@aghreed
Copy link

aghreed commented Nov 7, 2016

This is still an issue in v2.5.7 here if are using the function callback instead of the boolean value for paginationShowsTotal.

Seems like the issue is here: https://github.com/AllenFang/react-bootstrap-table/blob/master/src/pagination/PaginationList.js#L95

Essentially when its a boolean, the to value is actually returned as to + 1. But when its a function, to is not getting that +1 bump.

@AllenFang
Copy link
Owner

Forward to #818. Thanks your bug report :)

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

No branches or pull requests

3 participants