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
@ -481,13 +481,16 @@ this.fnDestroy = function ( bRemove )
|
|||||||
|
|
||||||
/* Fire off the destroy callbacks for plug-ins etc */
|
/* Fire off the destroy callbacks for plug-ins etc */
|
||||||
_fnCallbackFire( oSettings, "aoDestroyCallback", "destroy", [oSettings] );
|
_fnCallbackFire( oSettings, "aoDestroyCallback", "destroy", [oSettings] );
|
||||||
|
|
||||||
/* Restore hidden columns */
|
/* If the table is not being removed, restore the hidden columns */
|
||||||
for ( i=0, iLen=oSettings.aoColumns.length ; i<iLen ; i++ )
|
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