Skip to content

Commit

Permalink
sorter click event on the th so that the event is easier to trigger
Browse files Browse the repository at this point in the history
  • Loading branch information
Ian Page Hands committed Nov 5, 2015
1 parent d1a602d commit 3387dab
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion lib/assets/sorter.js
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,9 @@ var addSorting = (function () {
};
for (i =0 ; i < cols.length; i += 1) {
if (cols[i].sortable) {
el = getNthColumn(i).querySelector('.sorter');
// add the click event handler on the th so users
// dont have to click on those tiny arrows
el = getNthColumn(i).querySelector('.sorter').parentElement;
if (el.addEventListener) {
el.addEventListener('click', ithSorter(i));
} else {
Expand Down

0 comments on commit 3387dab

Please sign in to comment.