list.js icon indicating copy to clipboard operation
list.js copied to clipboard

Serverside loading

Open tomadmiraal opened this issue 1 year ago • 1 comments

Is it possible to load data via an ajax call (serverside loading)?

We have lists with 10 thousands of records. It is not possible for us to load these in one go.

Unfortunately I couldn't find anything about it in the documentation

tomadmiraal avatar Apr 05 '24 07:04 tomadmiraal

Hi, I would grab the json data via a file or server side using Javascript fetch api https://developer.mozilla.org/en-US/docs/Web/API/Fetch_API/Using_Fetch

then return the json data and append the json data into one long data object and then pass into the list as 'jsonValues'. var userList = new List('mylist', options, jsonValues);

then use https://listjs.com/api/#indexAsync for larger lists.

coxy17 avatar Aug 24 '24 12:08 coxy17