On scroll start=NaN ?
On scroll start=NaN ?

Hi I'm using latest Datatables from Download page 1.10.18 with Scroller 1.5.0 ( no theme ).
Loading table is ok, but when scrolling it kept sending start=NaN.
Here is the code
div.gridview {
margin: 0px;
width:300px;
left:0px;
top:50px;
bottom:0px;
z-index: 0;
display: block;
visibility: visible;
overflow:hidden;
position: absolute;
padding: 0 !important;
}
<div class="gridview">
<table class="cell-border">
</table>
</div>
$(function() {
load_table("location/list", "location", "Location");
});
function load_table(list_page, column_name, column_label, format_row) {
var table = $('table').DataTable({
serverSide: true,
deferRender: true,
dom: "frtiS",
scrollX: false,
scrollY: ($("div.gridview").height() - 38) + "px",
scroller: {
displayBuffer: 5,
},
searching: false,
processing: true,
select: true,
info: false,
bPaginate: true,
bSearchable: false,
columns: [{
"data" : column_name,
"title" : column_label
}],
order: [],
data: resp.result.data,
ajax: {
url: list_page,
type: "GET",
dataSrc: function(json) {
return json.result.data;
}
},
fnDrawCallback: function() {}
});
}
Ajax call to location/list will retrieve
"result" : {
"columns": [
{"data": "location", "title": "Location"},
],
"data" : [
{"location" : "Somewhere1"}
...
],
"recordsTotal" : 1000,
"recordsFiltered": 1000
}
This discussion has been closed.
Answers
I found that there is a change in length params that send during first loading and after scrolling...
Hi @wpsd ,
I'm not seeing that in this example here. We're happy to take a look, but as per the forum rules, please link to a test case - a test case that replicates the issue will ensure you'll get a quick and accurate response. Information on how to create a test case (if you aren't able to link to the page you are working on) is available here.
Cheers,
Colin
Hm, I never use jsfiddle before. Will try create a test site..
Ok here is the example
https://jsfiddle.net/wpsd2006/413ro2mn/101/
First load ok, on scroll start is NaN
This is the full script, in case above jsfiddle gone.
I use jsfiddle /echo/json/ ajax mockup request.
Datatables download options is
Step 1. DataTables
Step 2. jQuery3, DataTables
Step 3. Scroller
I'm not quite getting it I'm afraid. Where on the page is
NaN
showing?Allan
Open the console tab or Network tab in developer tools. Run the code and then when you scroll the table, the request params given for start is NaN
Hi @wpsd ,
Yep, thanks, I was seeing it and explained to Allan how to reproduce - I had thought he was going to respond onto this thread.
It appears it's a bug in the release - if you compare your fiddle to this one, which uses the nightly release of Scroller and doesn't show that odd behaviour.
Sorry for that inconvenience. We hope to release Scroller in the next week or two which will contain the fix - otherwise, the nightly builds should get you going.
Cheers,
Colin
Ok I will wait for the release then, thanks.
so, any updates regarding the fix,the problem i am facing is somewhat similar, but mine initially loads fine for the first few draws but when the "start" reaches above 200 it starts sending NAN. the data is fine because when i increase the length to higher number the table loads fine, it when scrolling to 200 i get that error.
Hi @adars47 ,
Scroller was released at the start of this month, so the fix that's discussed in this thread is now available. If you're seeing a problem, that'll be something different.
We're happy to take a look, but as per the forum rules, please link to a test case - a test case that replicates the issue will ensure you'll get a quick and accurate response. Information on how to create a test case (if you aren't able to link to the page you are working on) is available here.
Cheers,
Colin