The range element of the pagination fragment 10..20 can have an incorrect end point (20 in this example)
if the number of elements returned from the rest interface was not the page size (in this case pagesize = 10).
See the screenshot in this comment that shows 1..50 for 5 items.
It looks like modifying getPaginationFragment() to include a pagesize and a new datasize parmeter (where datasize variable
is data.collection.length in the caller). Then calculating the end count using
((parseInt(index) - 1) * parseInt(pagesize)) + datasize
should fix this.
I am assigning this to Nikunj and not Malav so that we have a couple of devs working on classhelper.js.
Be careful you don't accidentally clobber each other's work on a merge.
The range element of the pagination fragment
10..20
can have an incorrect end point (20 in this example) if the number of elements returned from the rest interface was not the page size (in this case pagesize = 10). See the screenshot in this comment that shows1..50
for 5 items.It looks like modifying getPaginationFragment() to include a pagesize and a new datasize parmeter (where datasize variable is data.collection.length in the caller). Then calculating the end count using
((parseInt(index) - 1) * parseInt(pagesize)) + datasize
should fix this.I am assigning this to Nikunj and not Malav so that we have a couple of devs working on classhelper.js. Be careful you don't accidentally clobber each other's work on a merge.