1
0
mirror of https://github.com/DataTables/DataTables.git synced 2025-03-15 16:29:16 +01:00

Fix: Use synchronous processing for sorting when processing label is not

shown
This commit is contained in:
Allan Jardine 2014-05-01 11:43:57 +01:00
parent 7f7861b2e2
commit 0406a47e6a
2 changed files with 17 additions and 11 deletions

View File

@ -1 +1 @@
94372bc77037fad82ce126ee604d299fa3dce5fe
e3be6800b2a627ed293acb71380ef15d18f47b91

View File

@ -4586,18 +4586,24 @@
return;
}
_fnProcessingDisplay( settings, true );
// If processing is enabled use a timeout to allow the processing
// display to be shown - otherwise to it synchronously
if ( settings.oFeatures.bProcessing ) {
_fnProcessingDisplay( settings, true );
// Use a timeout to allow the processing display to be shown.
setTimeout( function() {
setTimeout( function() {
_fnSortListener( settings, colIdx, e.shiftKey, callback );
// In server-side processing, the draw callback will remove the
// processing display
if ( _fnDataSource( settings ) !== 'ssp' ) {
_fnProcessingDisplay( settings, false );
}
}, 0 );
}
else {
_fnSortListener( settings, colIdx, e.shiftKey, callback );
// In server-side processing, the draw callback will remove the
// processing display
if ( _fnDataSource( settings ) !== 'ssp' ) {
_fnProcessingDisplay( settings, false );
}
}, 0 );
}
} );
}