Skip to content

Commit

Permalink
fix - header sorting is not work in HTML Column. jspreadsheet#1693
Browse files Browse the repository at this point in the history
  • Loading branch information
ykawakamy committed Oct 13, 2024
1 parent 15afd8a commit 67dac51
Showing 1 changed file with 13 additions and 2 deletions.
15 changes: 13 additions & 2 deletions src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -8239,8 +8239,19 @@ if (! formula && typeof(require) === 'function') {
// Double click over header
if (jexcelTable[1] == 1 && jexcel.current.options.columnSorting == true) {
// Check valid column header coords
var columnId = e.target.getAttribute('data-x');
if (columnId) {
var getHeader = function(element) {
if (element) {
var x = element.getAttribute('data-x');
if (x) {
return element;
} else {
return getHeader(element.parentNode);
}
}
}
const headerCell = getHeader(e.target);
if (headerCell) {
var columnId = headerCell.getAttribute('data-x');
jexcel.current.orderBy(columnId);
}
}
Expand Down

0 comments on commit 67dac51

Please sign in to comment.