mirror of
https://github.com/DataTables/DataTables.git
synced 2024-12-02 14:24:11 +01:00
Merge pull request #83 from kycook/patch2
Only restore hidden columns if table is not being removed from DOM
This commit is contained in:
commit
e83488ab56
@ -482,12 +482,15 @@ 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…
Reference in New Issue
Block a user