Skip to content

Commit 309b393

Browse files
authored
Fixes issue with css removal when changing sort order. (#67)
* Fixes issue with css removal when changing sort order. When css is used to display icons as headers previous version would remove inner html and replace it with blank or an arrow making use of SVG via CSS in table headers impossible. * Changes also in public/
1 parent ddf88c4 commit 309b393

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

npm/table-sort.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -228,8 +228,8 @@ function tableSortJs(testingTableSortJS = false, domDocumentWindow = document) {
228228
}
229229

230230
function clearArrows(arrowUp = "▲", arrowDown = "▼") {
231-
th.innerText = th.innerText.replace(arrowUp, "");
232-
th.innerText = th.innerText.replace(arrowDown, "");
231+
th.innerHTML = th.innerHTML.replace(arrowUp, "");
232+
th.innerHTML = th.innerHTML.replace(arrowDown, "");
233233
}
234234

235235
if (columnData[0] === undefined) {

public/table-sort.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -228,8 +228,8 @@ function tableSortJs(testingTableSortJS = false, domDocumentWindow = document) {
228228
}
229229

230230
function clearArrows(arrowUp = "▲", arrowDown = "▼") {
231-
th.innerText = th.innerText.replace(arrowUp, "");
232-
th.innerText = th.innerText.replace(arrowDown, "");
231+
th.innerHTML = th.innerHTML.replace(arrowUp, "");
232+
th.innerHTML = th.innerHTML.replace(arrowDown, "");
233233
}
234234

235235
if (columnData[0] === undefined) {

0 commit comments

Comments
 (0)