Quantcast
Channel: Recent Discussions — DataTables forums
Viewing all articles
Browse latest Browse all 81687

Scroller + Server Side processing

$
0
0
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.

Viewing all articles
Browse latest Browse all 81687

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>