Paging on last page with full numbers - correct behaviour?
Paging on last page with full numbers - correct behaviour?
Hi,
I've found an unexpected behavior (at least for me) that is probably a bug on paging.
First of all I populated the ajax table with sequential records from 1 to 966 so it's more easy to note paging issues.
Then I added a new example file (bug_pipeline.html) that is a copy of pipeline.html but the only change I made is:
[code]"sPaginationType": "full_numbers",[/code]
After that I ran the example on http://brainotics.net/datatables/examples/server_side/big_pipeline.html; the steps to reproduce it are:
1) Move to the last page using the last button. You will see entries from 961 to 966 and that's perfect.
2) Now change the dropdown for DisplayLength. By default is on 10, select 100 entries. That will show you entries from 867 to 966. The expected behavior is to display entries from 901 to 966 on the last page (page 10) because:
[code]
Page # Entries (From - To)
--------------------------------
1 1-100
2 101-200
3 201-300
4 301-400
5 401-500
6 501-600
7 601-700
8 701-800
9 801-900
10 (last) 901-966
[/code]
I think and expect that if you change the page size you should get the number of results for that page, that's the way all the paging i've seen works. What is weird for me and disconcerting for the user is that today is possible to see different results on the same page depending on the way you arrive to it, if you navigate to it by clicking next it will show you the only the remaining results but in the case I described to you it will show the last 100 records (for example).
Have any of you experienced the same problem? What do you think about this?
I'll be waiting for your comments.
Regards,
Rodrigo
PS: I've fixed it, so if anyone is interested I can post the solution here.
I've found an unexpected behavior (at least for me) that is probably a bug on paging.
First of all I populated the ajax table with sequential records from 1 to 966 so it's more easy to note paging issues.
Then I added a new example file (bug_pipeline.html) that is a copy of pipeline.html but the only change I made is:
[code]"sPaginationType": "full_numbers",[/code]
After that I ran the example on http://brainotics.net/datatables/examples/server_side/big_pipeline.html; the steps to reproduce it are:
1) Move to the last page using the last button. You will see entries from 961 to 966 and that's perfect.
2) Now change the dropdown for DisplayLength. By default is on 10, select 100 entries. That will show you entries from 867 to 966. The expected behavior is to display entries from 901 to 966 on the last page (page 10) because:
[code]
Page # Entries (From - To)
--------------------------------
1 1-100
2 101-200
3 201-300
4 301-400
5 401-500
6 501-600
7 601-700
8 701-800
9 801-900
10 (last) 901-966
[/code]
I think and expect that if you change the page size you should get the number of results for that page, that's the way all the paging i've seen works. What is weird for me and disconcerting for the user is that today is possible to see different results on the same page depending on the way you arrive to it, if you navigate to it by clicking next it will show you the only the remaining results but in the case I described to you it will show the last 100 records (for example).
Have any of you experienced the same problem? What do you think about this?
I'll be waiting for your comments.
Regards,
Rodrigo
PS: I've fixed it, so if anyone is interested I can post the solution here.
This discussion has been closed.
Replies
Thanks very much for posing this question - its a good one! I've pinned this discussion to the top of the forum for the moment, and hopefully a a few others will be able to provide their insights into this. I've also modified the title slightly since its not a bug at the moment, since it is working as designed, but the design might have been in error...
The reason I did it this way originally was if you got to the last page and there are only (for example) 5 records, then select to view 25 records per page, that is reflected immediately at the moment. That might in fairness have been an incorrect decision of mine.
I can see the arguments both ways, so I'd be interested in what everyone one would expect the behaviour to be in this case.
Regards,
Allan
Thanks for this big piece of software!!! It is great!!! And also for your quick reply.
Regards,
Rodrigo
Currently if the user navigates to the last line, changes the page size[1], pages BACK and then FORWARD again[2], what he/she sees on the last page at time spot [1] and [2] is not identical--some records at spot [1] appear to be "gone" at the second time when the last page is displayed again. This is can confuse the user.
Thanks,
Allan
Regards,
Allan
Was the fix for above mentioned issue by Rodrigo, done in any of the release?. I'm too facing the issue and it looks weird from a end user perspective.
Thanks
Pradeep