mirror of
https://github.com/DataTables/DataTables.git
synced 2025-02-19 17:54:14 +01:00
Fixed: When displaying full data set with server-side processing (_iDisplayLength = -1), this would incorrectly be shown in the table information - 2440
This commit is contained in:
parent
9fcaccb570
commit
fb0eee822e
32
media/unit_testing/tests_onhold/4_server-side/2440.js
Normal file
32
media/unit_testing/tests_onhold/4_server-side/2440.js
Normal file
@ -0,0 +1,32 @@
|
||||
// DATA_TEMPLATE: empty_table
|
||||
/*
|
||||
* NOTE: There are some differences in this zero config script for server-side
|
||||
* processing compared to the other data sources. The main reason for this is the
|
||||
* difference in how the server-side processing does it's filtering. Also the
|
||||
* sorting state is always reset on each draw.
|
||||
*/
|
||||
oTest.fnStart( "Info element with display all" );
|
||||
|
||||
$(document).ready( function () {
|
||||
var oTable = $('#example').dataTable( {
|
||||
"bServerSide": true,
|
||||
"sAjaxSource": "../../../examples/examples_support/server_processing.php"
|
||||
} );
|
||||
|
||||
oTable.fnSettings()._iDisplayLength = -1;
|
||||
oTable.oApi._fnCalculateEnd( oTable.fnSettings() );
|
||||
oTable.fnDraw();
|
||||
|
||||
|
||||
/* Basic checks */
|
||||
oTest.fnWaitTest(
|
||||
"Check length is correct when -1 length given",
|
||||
null,
|
||||
function () {
|
||||
return document.getElementById('example_info').innerHTML ==
|
||||
"Showing 1 to 57 of 57 entries";
|
||||
}
|
||||
);
|
||||
|
||||
oTest.fnComplete();
|
||||
} );
|
Loading…
x
Reference in New Issue
Block a user