Created
October 5, 2017 19:21
-
-
Save dperussina/b0f9a4da1b49e21ea27ceb2053bc58c2 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//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