ColumnControl - inserted instead of in
ColumnControl - inserted instead of in

Link to test case:
https://github.com/DataTables/ColumnControl/blame/a334ecc37062fa42250bf8684a9144ebcade0898/js/dataTables.columnControl.ts#L180
Description of problem:
Hello,
When importing ColumnControl in an app, all the table headers have td child elements instead of th, even when the extension is not enabled for a particular table.
Is this behavior expected ? Shouldn't the line linked above be rather:
tr.appendChild(createElement(isHeader ? 'th' : 'td'));
?
Best regards,
Thibault
Answers
Hi Thibault,
Thanks for your question. That's intentional -
td
is a valid tag to use in thethead
row and I was generally expecting any rows in the ehader that are dynamically added to not be the header cells (more likely to be used for search boxes, which are not headers - there would likely be ath
above them).On that assumption I think
td
is semantically the correct one to use.That statement bothers me though. ColumnControl shouldn't be doing anything on a table that it isn't enable for. Can you give me a link to a test case showing the issue so I can take a look into what is happening there please?
Thanks,
Allan