Datatables 1.10.2 BUG: incorrect records info on perpage change

Datatables 1.10.2 BUG: incorrect records info on perpage change

babablacksheepbabablacksheep Posts: 41Questions: 23Answers: 0
edited August 2014 in Free community support

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.

  1. open https://datatables.net/examples/data_sources/ajax.html
  2. default per page is 10, select page 3 from pagination
  3. then change per page select to 25
  4. Now the table is not showing the correct information.
    Table Info displays Showing 21 to 45 of 57 entries which is wrong since it is at page-2 now, it should be Showing 26 to 50 of 57 entries ....
  5. 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

Answers

  • babablacksheepbabablacksheep Posts: 41Questions: 23Answers: 0

    @allan: How can i fix this ?

  • babablacksheepbabablacksheep Posts: 41Questions: 23Answers: 0

    hi,
    Any thoughts on this bug ?

  • allanallan Posts: 63,552Questions: 1Answers: 10,477 Site admin
    Answer ✓

    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

This discussion has been closed.