1
0
mirror of https://github.com/DataTables/DataTables.git synced 2024-12-02 14:24:11 +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:
Allan Jardine 2011-06-25 07:40:30 +01:00
parent d21a8529ee
commit 41bf4e28bd

View File

@ -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();