From f3f0a291cdeff6ded7ac965cac5877a4cd1ee10e Mon Sep 17 00:00:00 2001 From: Allan Jardine Date: Thu, 21 May 2020 09:29:10 +0000 Subject: [PATCH] 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 --- .datatables-commit-sync | 2 +- examples/resources/demo.js | 9 +++++++++ 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/.datatables-commit-sync b/.datatables-commit-sync index cbb83c41..d841bf2a 100644 --- a/.datatables-commit-sync +++ b/.datatables-commit-sync @@ -1 +1 @@ -0dd502bbc4a317ddc1da948e4a2f4ac8977f7489 +ed72bfc2985f81b9c4e86fd2835dabd3fa193417 diff --git a/examples/resources/demo.js b/examples/resources/demo.js index 1c88da08..c7390d52 100644 --- a/examples/resources/demo.js +++ b/examples/resources/demo.js @@ -28,6 +28,7 @@ if ( window.$ ) { // init html var table = $('

').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( $('').text( str ) );