_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
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