how do i use load datatables with an elastic search response and call the api again pagination?
how do i use load datatables with an elastic search response and call the api again pagination?
abhishek10281
Posts: 3Questions: 2Answers: 0
I have an api which loads 20 records at a time and every time i click on the next page needs to load another set of records .
The problem is i dont get which funtions to use in datatables to load api and then how to use the callback. Can someone help me out ?
This discussion has been closed.
Answers
What you describe is how server-side processing works in DataTables.
Allan
It is a post api and i have to get the data and sanatize it in a way it suitable for the table to under stand which is fine. but the prob is the api returns 20 records so when on pagination i have to render the next two records. i am a bit confused with whole syntax part. if you could help on it
The documentation I linked to describes the API that DataTables uses for server-side processing. Basically you have to have the server expect that set of data, and then respond with the JSON parameters that DataTables expects.
If it isn't possible to do that with your API you would need a proxy somewhere to translate between them.
Allan