Skip to content

Commit

Permalink
fix: try adding sort icon on non sortable column shouldn't throw (#930
Browse files Browse the repository at this point in the history
)
  • Loading branch information
ghiscoding authored Nov 24, 2023
1 parent d39e827 commit 4ef172d
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions slick.grid.js
Original file line number Diff line number Diff line change
Expand Up @@ -3002,11 +3002,14 @@ if (typeof Slick === "undefined") {
if (column) {
column.classList.add("slick-header-column-sorted");
let indicator = column.querySelector(".slick-sort-indicator");
indicator.classList.add(col.sortAsc ? "slick-sort-indicator-asc" : "slick-sort-indicator-desc");

if (indicator) {
indicator.classList.add(col.sortAsc ? "slick-sort-indicator-asc" : "slick-sort-indicator-desc");
}
if (numberCols) {
indicator = column.querySelector(".slick-sort-indicator-numbered");
indicator.textContent = i;
if (indicator) {
indicator.textContent = i;
}
}
}
}
Expand Down

0 comments on commit 4ef172d

Please sign in to comment.