1
0
mirror of https://github.com/DataTables/DataTables.git synced 2025-01-18 11:52:11 +01:00

Fix: Ajax callback function wasn't being called when server-side

processing was enabled (ajax.reload() and ajax.url().load())
This commit is contained in:
Allan Jardine 2014-02-17 10:18:54 +00:00
parent c12b50daef
commit 6968422b42
2 changed files with 11 additions and 4 deletions

View File

@ -1 +1 @@
9e579f5fd864d5e104517a3b00716aac43396913
636d523ddba3c57812372a7488fadaf611b92386

View File

@ -7108,10 +7108,17 @@
}
_fnReDraw( settings, holdPosition );
} );
}
if ( callback ) {
callback( json );
}
// Use the draw event to trigger a callback, regardless of if it is an async
// or sync draw
if ( callback ) {
var api = new _Api( settings );
api.one( 'draw', function () {
console.log( api.ajax.json() );
callback( api.ajax.json() );
} );
}
};