table-sort-js
Advanced tools
Comparing version 1.19.0 to 1.20.0
{ | ||
"name": "table-sort-js", | ||
"version": "1.19.0", | ||
"version": "1.20.0", | ||
"description": "A JavaScript client-side HTML table sorting library with no dependencies required.", | ||
@@ -5,0 +5,0 @@ "license": "MIT", |
@@ -85,3 +85,3 @@ /* | ||
const tableColumn = tr | ||
.querySelectorAll("td") | ||
.querySelectorAll("* > th , * > td") | ||
.item( | ||
@@ -129,7 +129,5 @@ column.span[columnIndex] === 1 | ||
for (let index of table.theads.keys()) { | ||
if (table.theads.item(index).querySelectorAll("th").length == 0) { | ||
table.headers.push(table.theads.item(index).querySelectorAll("td")); | ||
} else { | ||
table.headers.push(table.theads.item(index).querySelectorAll("th")); | ||
} | ||
table.headers.push( | ||
table.theads.item(index).querySelectorAll("* > th , * > td") | ||
); | ||
} | ||
@@ -205,3 +203,5 @@ for (let index of table.bodies.keys()) { | ||
for (let [i, tr] of table.visibleRows.entries()) { | ||
let fileSizeTd = tr.querySelectorAll("td").item(columnIndex).textContent; | ||
let fileSizeTd = tr | ||
.querySelectorAll("* > th , * > td") | ||
.item(columnIndex).textContent; | ||
let match = fileSizeTd.match(numberWithUnitType); | ||
@@ -471,3 +471,4 @@ if (match) { | ||
} | ||
tr.querySelectorAll("td").item(columnIndex).innerHTML = fileSizeInBytesHTML; | ||
tr.querySelectorAll("* > th , * > td").item(columnIndex).innerHTML = | ||
fileSizeInBytesHTML; | ||
return table.hasClass.cellsSort ? tr.innerHTML : tr.outerHTML; | ||
@@ -539,3 +540,3 @@ } | ||
return tr | ||
.querySelectorAll("td") | ||
.querySelectorAll("* > th , * > td") | ||
.item( | ||
@@ -542,0 +543,0 @@ colSpanData[columnIndex] === 1 |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
589
30070