DataTable initialization calls draw twice because of paging

DataTable initialization calls draw twice because of paging

PichutanPichutan Posts: 5Questions: 2Answers: 0

Hello dear community,

I have a more general question. I have a DataTable which is initialized with

    serverSide: true,
    ajax: "insert url here",
    responsive: {
       //some stuff here
    }, 
   pageLength: 100,
   stateSave: true

I wondered why my table takes so long to initialize. So I checked out the draw calls of the DT. I recognized that the first draw is done with

start: 0 
length: 100

and the second one as well with

start: 0
length: 100

But when I swapped to the second page and reload the page, then the first call is done with:

start: 0
length: 100

but the second one is

start: 100
length: 100

I know that an ajax call is made everytime the table needs to draw.

What are the common mistakes which produces more calls than necessary during initialization?

Thanks for your input.
Pichutan

Answers

Sign In or Register to comment.