Fix in _fnCalculateColumnWidths
Fix in _fnCalculateColumnWidths
ivictbor
Posts: 6Questions: 2Answers: 0
On odd times when I do:
var column = oTable.api().column( $(this).attr('data-column') );
column.visible( ! column.visible() );
There is "Uncaught TypeError: Cannot read property 'style' of undefined" on:
headerCells[i].style.width = column.sWidthOrig !== null && column.sWidthOrig !== '' ?
_fnStringToCss( column.sWidthOrig ) :
'';
and header becomes broken.
Simple checking for undefined, at least dont brake table.
if(headerCells[i] !== undefined){
headerCells[i].style.width = column.sWidthOrig !== null && column.sWidthOrig !== '' ?
_fnStringToCss( column.sWidthOrig ) :
'';
}
This discussion has been closed.
Replies
Could you confirm which version of DataTables you are using please? If 1.10.7, can you try the 1.10.8-dev nightly please?
Allan