mirror of
https://github.com/DataTables/DataTables.git
synced 2025-02-19 17:54:14 +01:00
Dev fix: Hidden columns could break width calculations - unit test found
This commit is contained in:
parent
a5bba04353
commit
b2d528d0d8
7
media/js/jquery.dataTables.js
vendored
7
media/js/jquery.dataTables.js
vendored
@ -5371,18 +5371,23 @@
|
||||
/* Apply custom sizing to the cloned header */
|
||||
var nThs = _fnGetUniqueThs( oSettings, nTheadClone );
|
||||
iCorrector = 0;
|
||||
console.log( nThs );
|
||||
for ( i=0 ; i<iColums ; i++ )
|
||||
{
|
||||
var oColumn = oSettings.aoColumns[i];
|
||||
if ( oColumn.bVisible && oColumn.sWidthOrig !== null && oColumn.sWidthOrig !== "" )
|
||||
{
|
||||
nThs[i-iCorrector].style.width = _fnStringToCss( oColumn.sWidthOrig );
|
||||
iCorrector++;
|
||||
}
|
||||
else if ( oColumn.bVisible )
|
||||
{
|
||||
console.log( i, iCorrector );
|
||||
nThs[i-iCorrector].style.width = "";
|
||||
}
|
||||
else
|
||||
{
|
||||
iCorrector++;
|
||||
}
|
||||
}
|
||||
|
||||
/* Find the biggest td for each column and put it into the table */
|
||||
|
Loading…
x
Reference in New Issue
Block a user