mirror of
https://github.com/DataTables/DataTables.git
synced 2024-12-10 22:24:10 +01:00
Fix: Columns which are sortable but hidden have events attached to them for sorting, but this event handler is not removed when the column is made visible again for fnDestroy. Simply need to change the order of how the destroy is done - i.e. remove events just after the columns are made visible, not before - 5497
This commit is contained in:
parent
d21a8529ee
commit
41bf4e28bd
6
media/js/jquery.dataTables.js
vendored
6
media/js/jquery.dataTables.js
vendored
@ -2138,9 +2138,6 @@
|
||||
/* Flag to note that the table is currently being destoryed - no action should be taken */
|
||||
oSettings.bDestroying = true;
|
||||
|
||||
/* Blitz all DT events */
|
||||
$(oSettings.nTableWrapper).find('*').andSelf().unbind('.DT');
|
||||
|
||||
/* Restore hidden columns */
|
||||
for ( i=0, iLen=oSettings.aoColumns.length ; i<iLen ; i++ )
|
||||
{
|
||||
@ -2150,6 +2147,9 @@
|
||||
}
|
||||
}
|
||||
|
||||
/* Blitz all DT events */
|
||||
$(oSettings.nTableWrapper).find('*').andSelf().unbind('.DT');
|
||||
|
||||
/* If there is an 'empty' indicator row, remove it */
|
||||
$('tbody>tr>td.'+oSettings.oClasses.sRowEmpty, oSettings.nTable).parent().remove();
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user