javve / list.js

The perfect library for adding search, sort, filters and flexibility to tables, lists and various HTML elements. Built to be invisible and work on existing HTML.
https://listjs.com
MIT License
11.2k stars 896 forks source link

Serverside loading #774

Open tomadmiraal opened 7 months ago

tomadmiraal commented 7 months ago

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

coxy17 commented 2 months ago

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.