mirror of
https://github.com/DataTables/DataTables.git
synced 2024-12-02 14:24:11 +01:00
Fix: fnSetColumnVis was broken when used with deferred rendering due to the offset calculation done with the huge flat array of TD nodes. The fix is to simplify this somewhat and get an array for each row (when it is available) and process that using the optional parameter for _fnGetTdNodes. This doesn't result any any extra computation time, other than the addional time to call the function (but not to execute it), since it is just moving where the loop is.
This commit is contained in:
parent
97386476c8
commit
f27c487862
3
media/js/jquery.dataTables.js
vendored
3
media/js/jquery.dataTables.js
vendored
@ -2085,12 +2085,11 @@
|
||||
else
|
||||
{
|
||||
/* Remove a column from display */
|
||||
anTds = _fnGetTdNodes( oSettings );
|
||||
for ( i=0, iLen=oSettings.aoData.length ; i<iLen ; i++ )
|
||||
{
|
||||
if ( oSettings.aoData[i].nTr !== null )
|
||||
{
|
||||
nTd = anTds[ ( i*oSettings.aoColumns.length) + (iCol*1) ];
|
||||
nTd = _fnGetTdNodes( oSettings, i )[iCol];
|
||||
oSettings.aoData[i]._anHidden[iCol] = nTd;
|
||||
nTd.parentNode.removeChild( nTd );
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user