Datatables 1.10.2 BUG: incorrect records info on perpage change
Datatables 1.10.2 BUG: incorrect records info on perpage change
babablacksheep
Posts: 41Questions: 23Answers: 0
Datatables 1.10 shows incorrect records info when per-page select/dropdown is changed.
This is visible on datatables.net examples too.
To see this error. Do the following.
- open https://datatables.net/examples/data_sources/ajax.html
- default per page is 10, select page 3 from pagination
- then change per page select to 25
- Now the table is not showing the correct information.
Table Info displaysShowing 21 to 45 of 57 entries
which is wrong since it is at page-2 now, it should beShowing 26 to 50 of 57 entries
.... - If we go to page 1 ( select 1 from pagination list) then it appears to correct its self.
This question has an accepted answers - jump to answer
This discussion has been closed.
Answers
@allan: How can i fix this ?
hi,
Any thoughts on this bug ?
The paging info counter is correct - it is showing records 21 to 45. The reason for this is that it doesn't change the start point of the display if it can be avoided. So it isn't really "page 2" as such (not in base 25 terms anyway) but more 1.8 or there about!
So if there is a bug, it is because the page length change doesn't snap to the page point. DataTables has always done this as far as I can remember.
Allan