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
.