Skip to content
This repository has been archived by the owner on May 17, 2018. It is now read-only.

Possible bug in pagination. #100

Closed
pkaleta opened this issue Jul 25, 2013 · 1 comment
Closed

Possible bug in pagination. #100

pkaleta opened this issue Jul 25, 2013 · 1 comment
Labels

Comments

@pkaleta
Copy link

pkaleta commented Jul 25, 2013

@wyuenho it feels weird that lastPage is less than firstPage in case when page numbers are 1-based and totalRecords is 0:

https://github.com/wyuenho/backbone-pageable/blob/master/test/server-pageable.js#L142

Is it a bug?

Anyway this causes a bug in backgrid-paginator. When a collection is empty, the links to next and last page are not disabled: https://github.com/wyuenho/backgrid-paginator/blob/master/backgrid-paginator.js#L152

@wyuenho
Copy link
Member

wyuenho commented Jul 27, 2013

lastPage should probably be set back to null to indicate that value is temporarily meaningless. If you can help me with that it'll be great. Otherwise I'll deal with it sometime next week.

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

Successfully merging a pull request may close this issue.

2 participants