Skip to content

Instantly share code, notes, and snippets.

@dperussina
Created October 5, 2017 19:21
Show Gist options
  • Save dperussina/b0f9a4da1b49e21ea27ceb2053bc58c2 to your computer and use it in GitHub Desktop.
Save dperussina/b0f9a4da1b49e21ea27ceb2053bc58c2 to your computer and use it in GitHub Desktop.
//1000 rows
xhr.get('URL', function(err, data){
if(err){
//do this
return;
}
buildTable(data);
})
function buildTable(myData){
var myData = [];
var len = myData.length - 1;
myData.forEach(function (e, i, a) {
var str = "";
table.appendTo(str);
// Building your table
if (i == len) {
//Render
setTimeout(function(){
render();
}, 1);
}
});
}
function render() {
datatable.show();
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment