Closed Whobeu closed 4 years ago
It looks like the only difference is this check:
if (!THead.rows[rowNum].cells[cellNum].classList.contains("js-sort-none")) {
Which seems like a fine idea. I'll check it out. Thank you.
Yes that was the only change I needed to make.
I made a similar adjustment and committed it. I also adjusted the demo.html to test with. I used an older way of class checking to maintain broader browser compatibility.
I was experimenting with marking some cells in a separate row in the "thead" section of a table as "js-sort-none". However, even though no sort indicator was shown, the cells were still clickable. I made a very slight change shown below to the code that attaches the click events and now only cells marked for sorting are clickable. Cells with class="js-sort-none" are not clickable: