Uncaught RangeError: currentPage
must be firstPage <= currentPage >= totalPages if 0-based. Got 7.
#158
Comments
If you are displaying a page with 100 items then why do you have a pageSize of 20? How did you change the page size? |
My initial page size is 20. I have options to choose page size [10, 20 ,50, 100]. First I changed page size to 100. It's ok. After that I changed to 10. It throw that error. |
I can't reproduce it from the backgrid examples. Which version of backbone and pageable are you using? |
Backbone.js 1.0.0 and backbone-pageable 1.4.5 |
Can you please upgrade to backbone >= 1.1.0 and try again please? pageable doesn't work with 1.0.0. |
OK, I changed bb to 1.1.2 and it's still happen. |
Ah ok. Looks like this only happens when firstPage is 0 and when you are shrinking the page size |
For now you can use setPageSize(10, {first: true}) to get around this. This is most likely what you'll want to do anyway. |
It worked. Thanks a million. |
My total_pages = 1 and my total_entries = 63. I'm displaying page with 100 items and change page size to 10. Then it throw this error.
This is my configuration :
state: {
pageSize: 20,
firstPage: 0
The text was updated successfully, but these errors were encountered: