Infinite scrolling with server-side

Infinite scrolling with server-side

neo87neo87 Posts: 2Questions: 1Answers: 0

Hello,
i am trying to use infinite scrolling to get data from ajax (instead of load all data in the first time), is it possible to do? If i enable server-side option, the search is assigned to server too, but i want DataTable to search only in the loaded rows, could i set something hybrid like this?
Thx in advance for support :)

Answers

  • allanallan Posts: 63,761Questions: 1Answers: 10,510 Site admin

    There is no infinite scrolling option in DataTables at this time.

    What you could possibly do is implement your own infinite scroll and use rows.add() to add the newly loaded rows to the DataTable on the client-side. That will cause the sorting and searching to be client-side as you were looking for.

    Allan

  • neo87neo87 Posts: 2Questions: 1Answers: 0

    Seems to be a fair solution, i think it will work. I will update you until i try it (i think in some weeks). For now, i can just say Thank you for the answer. :)

This discussion has been closed.