mirror of
https://github.com/DataTables/DataTables.git
synced 2025-03-15 16:29:16 +01:00
Dev fix: Sort indicator items weren't being redrawn
- Confusion aorund the `order` and `sort` events which resulted in the sort icons not being updated
This commit is contained in:
parent
7a32f2db93
commit
4549646891
@ -1 +1 @@
|
||||
7e07090066442c9e1b4bcbaf9c2b566f7af974fe
|
||||
7d8d52c60c66a7a672833810278db0d19ebd3ad9
|
||||
|
7
media/js/jquery.dataTables.js
vendored
7
media/js/jquery.dataTables.js
vendored
@ -4266,7 +4266,6 @@
|
||||
|
||||
/* Tell the draw function that we have sorted the data */
|
||||
oSettings.bSorted = true;
|
||||
_fnCallbackFire( oSettings, null, 'order', [oSettings] );
|
||||
}
|
||||
|
||||
|
||||
@ -6072,7 +6071,7 @@
|
||||
sortedColumns[ val.col ] = val.dir;
|
||||
} );
|
||||
|
||||
_fnCallbackFire( oSettings, null, 'sort', [oSettings, aSort, sortedColumns] );
|
||||
_fnCallbackFire( oSettings, null, 'order', [oSettings, aSort, sortedColumns] );
|
||||
_fnSortingClasses( oSettings );
|
||||
_fnSortAria( oSettings );
|
||||
}
|
||||
@ -13649,7 +13648,7 @@
|
||||
// No additional mark-up required
|
||||
|
||||
// Attach a sort listener to update on sort
|
||||
$(settings.nTable).on( 'sort', function ( e, settings, sorting, columns ) {
|
||||
$(settings.nTable).on( 'order.dt', function ( e, settings, sorting, columns ) {
|
||||
cell
|
||||
.removeClass(
|
||||
column.sSortingClass +' '+
|
||||
@ -13674,7 +13673,7 @@
|
||||
.appendTo( cell );
|
||||
|
||||
// Attach a sort listener to update on sort
|
||||
$(settings.nTable).on( 'sort', function ( e, settings, sorting, columns ) {
|
||||
$(settings.nTable).on( 'order.dt', function ( e, settings, sorting, columns ) {
|
||||
cell
|
||||
.removeClass( classes.sSortAsc +" "+classes.sSortDesc )
|
||||
.addClass( columns[ idx ] == 'asc' ?
|
||||
|
Loading…
x
Reference in New Issue
Block a user