Fix - example: Server-side pipelining didn't work when all data is requested

- Although this mitigates any benefits of using server-side processing
  it is something that should be handled.
- Thanks Hormah for pointing this out.
This commit is contained in:
Allan Jardine
2016-05-02 16:15:12 +01:00
parent 73abf82c1d
commit 26cbeccba1
4 changed files with 9 additions and 7 deletions

View File

@@ -111,7 +111,9 @@ $.fn.dataTable.pipeline = function ( opts ) {
if ( cacheLower != drawStart ) {
json.data.splice( 0, drawStart-cacheLower );
}
json.data.splice( requestLength, json.data.length );
if ( requestLength >= -1 ) {
json.data.splice( requestLength, json.data.length );
}
drawCallback( json );
}
@@ -289,7 +291,9 @@ $.fn.dataTable.pipeline = function ( opts ) {
if ( cacheLower != drawStart ) {
json.data.splice( 0, drawStart-cacheLower );
}
json.data.splice( requestLength, json.data.length );
if ( requestLength >= -1 ) {
json.data.splice( requestLength, json.data.length );
}
drawCallback( json );
}