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

ajax option function infinite recursion

$
0
0

I am trying to use the ajax option, passing it a function: ajax: (data, callback, settings) => { ... };

I am using this along with serverSide: true in order to make AJAX calls myself and then just calling the callback with the results. I discovered I have to call the callback with an object that looks like this: callback({ data: results }). Otherwise, I get an error saying data is undefined. The docs don't make this clear, since it is just sending back a parsed local storage "thing".

The problem I am running into is that the same call seems to be getting made repeatedly with the same start and length parameters. It will keep doing this until the browser says "Too much recursion". I tried including recordsTotal and recordsFiltered values but that didn't help.

If it helps, I am using this along side the deferRender, scroller, and paging.


Viewing all articles
Browse latest Browse all 81728

Trending Articles



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