Quantcast
Channel: Recent Discussions — DataTables forums
Viewing all articles
Browse latest Browse all 82115

Bug in _fnGetUniqueThs (jquery.dataTables.js 1.9.4). Column with wrong Th

$
0
0
_fnGetUniqueThs (jquery.dataTables.js 1.9.4) does not retrieve a list of only TH elements, but returns the elements of the lastest row (even if the last row is of td's elements).

line 1868 change:

from

if ( aLayout[i][j].unique &&
(!aReturn[j] || !oSettings.bSortCellsTop) )

to

if ( aLayout[i][j].unique &&
aLayout[i][j].cell.nodeName.toLowerCase() == 'th' &&
(!aReturn[j] || !oSettings.bSortCellsTop) )

In my case I could not apply the sort and filter to a table with a header in multiple rows because DataTables applied the listener to the last line (the td's elements row) rather then the th's row.

Thanks in advice

Luke

Viewing all articles
Browse latest Browse all 82115

Trending Articles