mirror of
https://github.com/DataTables/DataTables.git
synced 2026-01-09 14:28:06 -05:00
Searchpanes examples testing performance have large amounts of rows, which load slowly when the ajax rendering is active, now any ajax loading will only display the first thousand rows under the ajax tab.
Jira Issue DD-1294
This commit is contained in:
@@ -1 +1 @@
|
||||
0dd502bbc4a317ddc1da948e4a2f4ac8977f7489
|
||||
ed72bfc2985f81b9c4e86fd2835dabd3fa193417
|
||||
|
||||
@@ -28,6 +28,7 @@ if ( window.$ ) {
|
||||
|
||||
// init html
|
||||
var table = $('<p/>').append( $('table').clone() ).html();
|
||||
|
||||
var demoHtml = $.trim( $('div.demo-html').html() );
|
||||
|
||||
if ( demoHtml ) {
|
||||
@@ -63,6 +64,14 @@ if ( window.$ ) {
|
||||
str = JSON.stringify( str, null, 2 );
|
||||
} catch ( e ) {}
|
||||
|
||||
var strArr = str.split('\n');
|
||||
|
||||
if(strArr.length > 1000){
|
||||
strArr.splice(999);
|
||||
strArr.push('...');
|
||||
str = strArr.join('\n');
|
||||
}
|
||||
|
||||
$('div.tabs div.ajax').append(
|
||||
$('<code class="multiline language-js"/>').text( str )
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user