Scroller plugin with scrollCollapse causes pagination issues

Scroller plugin with scrollCollapse causes pagination issues

mak1mak1 Posts: 25Questions: 13Answers: 1

Hi all,

I'm using datatables 1.10.10, Chrome 49 and when I turn on scrollCollapse and use scroller the pagination numbers get messed up.

The issue is that before data is loaded to the datatable, scrollCollapse kicks in and shrinks the table as needed. Then once data is loaded, the scroller pagination still thinks the user can only see 1-2 rows at a time. So when you scroll all the way to the last record, you see weird pagination (count errors) information such as:

"Showing 1,611 to 1,613 of 1,619 entries"

When it should be saying "Showing 1,611 to 1,619 of 1,619 entries"

Here are the settings I'm using now
scrollY: 300,
scrollCollapse: true,
scroller:true,
scrollX: true ,
lengthChange: false,

I have tried changing all these settings to get a combination that would make this pagination work but I haven't got it to work. So I have resorted to commenting out scrollCollapse. The drawback now is that when few records are returned, the datatable looks ugly with weird lines.

Any thoughts?

This discussion has been closed.