Quantcast
Channel: Recent Discussions — DataTables forums
Viewing all articles
Browse latest Browse all 82220

DataTable initialization calls draw twice because of paging

$
0
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


Viewing all articles
Browse latest Browse all 82220

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>