mirror of
https://github.com/DataTables/DataTables.git
synced 2025-02-18 16:54:14 +01:00
Modified destroy method to only restore hidden columns if the table is not
being removed from DOM
This commit is contained in:
parent
d62ac092a6
commit
05201c21c4
@ -481,13 +481,16 @@ this.fnDestroy = function ( bRemove )
|
||||
|
||||
/* Fire off the destroy callbacks for plug-ins etc */
|
||||
_fnCallbackFire( oSettings, "aoDestroyCallback", "destroy", [oSettings] );
|
||||
|
||||
/* Restore hidden columns */
|
||||
for ( i=0, iLen=oSettings.aoColumns.length ; i<iLen ; i++ )
|
||||
|
||||
/* If the table is not being removed, restore the hidden columns */
|
||||
if ( !bRemove )
|
||||
{
|
||||
if ( oSettings.aoColumns[i].bVisible === false )
|
||||
for ( i=0, iLen=oSettings.aoColumns.length ; i<iLen ; i++ )
|
||||
{
|
||||
this.fnSetColumnVis( i, true );
|
||||
if ( oSettings.aoColumns[i].bVisible === false )
|
||||
{
|
||||
this.fnSetColumnVis( i, true );
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user