Scroller + Server Side processing
Scroller + Server Side processing
Hello,
I have a problem setting up infinite scrolling in datatables, so I've created a demo app to demo app to show the issue:
http://dt-scrollinfinite-serverside.herokuapp.com/
Source code: https://github.com/l3x4/datatables-scrollinfinite-serverside-demo
There are 1000 records in the database table and I'd like to show them in the table with the scroller.
The records are delivered by the server in portions of 100 items at a time.
The problem is when the polling happens the records counter is getting incremented twice: it gets +200 every time another 100 records arrive.
So it only scrolls up to record 600, assuming it's 1100 records out of 1000 already shown, so no need to scroll further.
You can inspect the requests and responses from the server on the demo app.
Initialization can also be inspected on the app or in the source code:
https://github.com/l3x4/datatables-scrollinfinite-serverside-demo/blob/master/app/assets/javascripts/buildings.js.coffee
Looks like I either missuse some parameters or missing some parameter...
Does anyone have an idea what's wrong here?
Than you.
I have a problem setting up infinite scrolling in datatables, so I've created a demo app to demo app to show the issue:
http://dt-scrollinfinite-serverside.herokuapp.com/
Source code: https://github.com/l3x4/datatables-scrollinfinite-serverside-demo
There are 1000 records in the database table and I'd like to show them in the table with the scroller.
The records are delivered by the server in portions of 100 items at a time.
The problem is when the polling happens the records counter is getting incremented twice: it gets +200 every time another 100 records arrive.
So it only scrolls up to record 600, assuming it's 1100 records out of 1000 already shown, so no need to scroll further.
You can inspect the requests and responses from the server on the demo app.
Initialization can also be inspected on the app or in the source code:
https://github.com/l3x4/datatables-scrollinfinite-serverside-demo/blob/master/app/assets/javascripts/buildings.js.coffee
Looks like I either missuse some parameters or missing some parameter...
Does anyone have an idea what's wrong here?
Than you.
This discussion has been closed.
Replies
This is what Scroller with server-side processing should work like:
http://datatables.net/release-datatables/extras/Scroller/server-side_processing.html
Allan
https://github.com/l3x4/datatables-scrollinfinite-serverside-demo/commit/2d9df4401eff6d3596d4184605550a4dbbb801ba