How 'start' value computed in DataTable pagination?

How 'start' value computed in DataTable pagination?

anjibmananjibman Posts: 115Questions: 10Answers: 0

Hi All,

I have 87 records returned from the server. Initially I have paging of size 20. So
a) In first call it send (draw=1, length=20, start=0)
b) Clicking page 5 it send (draw=2, length=20, start=80)
c) Now if I change length to 80 it send (draw=3, length=80, start=7) and I land on 2nd page with message "Showing 8 to 87 of 87 entries" which is incorrect it should send (draw=3, length=80, start=80) if land on 2nd page.

So I want to understand how 'start' is computed when changing page size?

Answers

  • anjibmananjibman Posts: 115Questions: 10Answers: 0

    Is this a bug in DataTable?
    I tried in https://www.datatables.net/examples/basic_init/alt_pagination.html and it happening there too.
    Step to reproduce:
    1. Click last page 6.
    2. Change page size to 50.
    Result: Land on page 2 with message Showing 8 to 57 of 57 entries
    Expected: If land on page 2, show message Showing 51 to 57 of 57 entries
    If land on page 1, show message Showing 1 to 50 of 57 entries
    3. Click on page 1.
    Result: Showing 1 to 50 of 57 entries
    Expected: This is OK

  • anjibmananjibman Posts: 115Questions: 10Answers: 0

    Hello ... do anyone know why this is happening???

This discussion has been closed.