Avoid entire table displaying while loading the page
Avoid entire table displaying while loading the page
LucasL
Posts: 1Questions: 1Answers: 0
Hello,
I have an issue, when I load the page, due the large amount of rows (~15000) the entire table is showed before paging and search builder load.
I'm taking care of the time issue, but there is a way to not show the raw table while loading, showing just after page loading is totally complete?
My table is relatively simple:
$.extend( $.fn.dataTable.defaults, {
responsive: true
} );
$(document).ready(function() {
$('#main-table').DataTable(
{
searchBuilder: {
columns: [1,2,3]
},
dom: 'QB<"clear">lfrtip',
}
);
} );
Answers
One option would be to call hide() when the page loads, then in
initComplete
when everything has loaded, call the show() method to show the table - something like this: http://live.datatables.net/ruhuguwu/23/editColin