Hi there,
I am very new to DataTables. I'm facing an issue related to the visibility of my results. I'm making an ajax request which returns 5155 items, ordered alphabetically.
But not all of these items are being shown at the first moment. It seems DataTables makes a sumarization of the data, and, for performance issues, "chooses" only some data to show.
For example, I have a lot of words that begin with 'A', but only a few of them are being shown.
Is there anything I need to set on my options to avoid this situation?
That's how my table is being initialized:
$('#myTable').DataTable({
ajax: {
url: "/my_service",
dataSrc: function(myList){
var data = [];
for(var i = 0; myList && i < myList.length; i++){
// do some stuff here....
data.push({
field1: myList[i].field1,
field2: myList[i].field2,
field3: myList[i].field3,
field4: myList[i].field4
})
}
}
return data;
}
},
columns: [
{ data: 'field1' },
{ data: 'field2' },
{ data: 'field3' },
{ data: 'field4' }
],
scrollY: true,
deferRender: false,
scroller: true,
language: {
decimal: ',',
thousands: '.'
}
});
$('#myTable').on( 'init.dt', function (e, settings, results) {
// do some stuffs here...
} );
Is there anything I'm missing?
Thanks,
Guilherme