mirror of
https://github.com/DataTables/DataTables.git
synced 2025-03-10 11:29:15 +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 */
|
/* 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…
x
Reference in New Issue
Block a user