From f2ca1c710e87c0bbff4f8c6dea0ef34ea7cc99e9 Mon Sep 17 00:00:00 2001 From: LeeWannacott Date: Fri, 8 Nov 2024 13:49:18 +1300 Subject: [PATCH] Fix bug with table-arrows when class not applied. --- README.md | 2 +- browser-extensions/chrome/table-sort-js.zip | Bin 8250 -> 8247 bytes browser-extensions/chrome/table-sort.js | 2 +- browser-extensions/firefox/table-sort-js.zip | Bin 8250 -> 8247 bytes browser-extensions/firefox/table-sort.js | 2 +- npm/README.md | 2 +- npm/package.json | 2 +- npm/table-sort.js | 2 +- public/index.html | 2 +- public/table-sort.js | 2 +- 10 files changed, 8 insertions(+), 8 deletions(-) diff --git a/README.md b/README.md index 0958d1a..4826748 100644 --- a/README.md +++ b/README.md @@ -54,7 +54,7 @@ Examples on using table-sort-js with frontend frameworks such as [React.js](http | <table> classes | Description | | --------------------- | ------------------------------------------------------------------------------------------------------------ | | "table-sort" | Make the table sortable! (Words, numbers, dates, file sizes)... | -| "table-arrows" | Display ascending or descending arrows. Supports custom arrows; example: "table-arrows-👆🤙👇" | +| "table-arrows" | Display ascending or descending arrows. Supports custom arrows; for example: "table-arrows-⇈⇋⇊" | | "no-class-infer" | Turns off inference for adding sort classes automatically e.g (file-size-sort, dates-dmy-sort), etc. | | "remember-sort" | If clicking on different columns remembers sort of the original column. | | "cells-sort" | sort cells (td) rather than table rows (tr); useful for keeping table rows with classes/attributes in place. | diff --git a/browser-extensions/chrome/table-sort-js.zip b/browser-extensions/chrome/table-sort-js.zip index c76b2e156af59de020065cd72067edb800e6ed64..46678cfc29e6a80f12848e11b48c23701dd94039 100644 GIT binary patch delta 1620 zcmV-a2CMnHK(|1!{|OBeZfIG+vA;k_6aWCSlMD(O0^?t^Ckk8+f3W`E%(c{npj`$& zf2_(sie3e1K+sw8I+wggALI)`olR10pQ(E)NV8`V-m^EZ21~E~;`J6^6>`?4QV*L% z`JrY71~F=&!&df7$=eG-Cjdw79Z}b;wNX*2S9uGS#+K9sp^Gy%okN|JO(xJda~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w=h=gx&zpW;uL3!|6Bi2p3_X`>i&zcKTTCiei^ewTP!fe5c_X=9E+A8CuLoBs% z3Q$zp)TnOjEo)$xd$|Q)E%)!t+k5p&u*O<2yBci0`7~<945ezc-nTA_f2**qOIYbZ zSv%t`p+T19K~%f8$)RCX&q(X7wm_P)fJcWWL$Ka=@&{9Qh(mVp?qC-U4lD4!sD z5BU@kvdZ!aREXk#0kec2RsjvCY-m~EegQ#C6aWCP Vljk2N0y$li5FjB2haLa`001UbAR+(& diff --git a/browser-extensions/chrome/table-sort.js b/browser-extensions/chrome/table-sort.js index b9fee90..a8b7f67 100644 --- a/browser-extensions/chrome/table-sort.js +++ b/browser-extensions/chrome/table-sort.js @@ -400,7 +400,7 @@ function tableSortJs(testingTableSortJS = false, domDocumentWindow = document) { } function changeArrowAndSort(arrowDirection, sortDirection) { - if (table.hasClass.tableArrows) { + if (table.hasClass.tableArrows[0]) { clearArrows(arrow); th.insertAdjacentText("beforeend", arrowDirection); } diff --git a/browser-extensions/firefox/table-sort-js.zip b/browser-extensions/firefox/table-sort-js.zip index ed9b9caee04a950912d6a688c738a24ade6bd335..12cba6666eb7e466f6ae1793eddc22584e92fa97 100644 GIT binary patch delta 1620 zcmV-a2CMnHK(|1!{|OBeZfIG+vA;k_6aWCSlMD(O0^?t^Ckk8+f3W`E%(c{npj`$& zf2_(sie3e1K+sw8I+wggALI)`olR10pQ(E)NV8`V-m^EZ21~E~;`J6^6>`?4QV*L% z`JrY71~F=&!&df7$=eG-Cjdw79Z}b;wNX*2S9uGS#+K9sp^Gy%okN|JO(xJda~;L% zBkmfF`?VlC9N;dF*Cq^5$W@3KcgC?=6{B_`qZTo{}hs6%p$j zU$|yS5wIC}=nR-9oaT|WzcQMF*&^@e<-YIRyi~TLfX>agg26+&JB8F}mGRe^YHSL>ceF7h^p1zCSQ* zH_|&Vz%;+(Il6HNb5*~M@$-y-e#1X6_~(nbGtu27TBkf**W2;634b1{0jeS?va=IA zp#{wB1&6XK4fwIXH^gM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jvCY-m~EegQ#C6aWCP Vljk2N0y$li5FjB2haLa`001UbAR+(& diff --git a/browser-extensions/firefox/table-sort.js b/browser-extensions/firefox/table-sort.js index b9fee90..a8b7f67 100644 --- a/browser-extensions/firefox/table-sort.js +++ b/browser-extensions/firefox/table-sort.js @@ -400,7 +400,7 @@ function tableSortJs(testingTableSortJS = false, domDocumentWindow = document) { } function changeArrowAndSort(arrowDirection, sortDirection) { - if (table.hasClass.tableArrows) { + if (table.hasClass.tableArrows[0]) { clearArrows(arrow); th.insertAdjacentText("beforeend", arrowDirection); } diff --git a/npm/README.md b/npm/README.md index 0958d1a..4826748 100644 --- a/npm/README.md +++ b/npm/README.md @@ -54,7 +54,7 @@ Examples on using table-sort-js with frontend frameworks such as [React.js](http | <table> classes | Description | | --------------------- | ------------------------------------------------------------------------------------------------------------ | | "table-sort" | Make the table sortable! (Words, numbers, dates, file sizes)... | -| "table-arrows" | Display ascending or descending arrows. Supports custom arrows; example: "table-arrows-👆🤙👇" | +| "table-arrows" | Display ascending or descending arrows. Supports custom arrows; for example: "table-arrows-⇈⇋⇊" | | "no-class-infer" | Turns off inference for adding sort classes automatically e.g (file-size-sort, dates-dmy-sort), etc. | | "remember-sort" | If clicking on different columns remembers sort of the original column. | | "cells-sort" | sort cells (td) rather than table rows (tr); useful for keeping table rows with classes/attributes in place. | diff --git a/npm/package.json b/npm/package.json index e580f38..9897cd1 100644 --- a/npm/package.json +++ b/npm/package.json @@ -1,6 +1,6 @@ { "name": "table-sort-js", - "version": "1.22.0", + "version": "1.22.1", "description": "A JavaScript client-side HTML table sorting library with no dependencies required.", "license": "MIT", "repository": "LeeWannacott/table-sort-js", diff --git a/npm/table-sort.js b/npm/table-sort.js index b9fee90..a8b7f67 100644 --- a/npm/table-sort.js +++ b/npm/table-sort.js @@ -400,7 +400,7 @@ function tableSortJs(testingTableSortJS = false, domDocumentWindow = document) { } function changeArrowAndSort(arrowDirection, sortDirection) { - if (table.hasClass.tableArrows) { + if (table.hasClass.tableArrows[0]) { clearArrows(arrow); th.insertAdjacentText("beforeend", arrowDirection); } diff --git a/public/index.html b/public/index.html index 3bbb8e4..bdbc933 100644 --- a/public/index.html +++ b/public/index.html @@ -8,7 +8,7 @@

Manual testing of table sort js

- +
diff --git a/public/table-sort.js b/public/table-sort.js index b9fee90..a8b7f67 100644 --- a/public/table-sort.js +++ b/public/table-sort.js @@ -400,7 +400,7 @@ function tableSortJs(testingTableSortJS = false, domDocumentWindow = document) { } function changeArrowAndSort(arrowDirection, sortDirection) { - if (table.hasClass.tableArrows) { + if (table.hasClass.tableArrows[0]) { clearArrows(arrow); th.insertAdjacentText("beforeend", arrowDirection); }
Last Name First Name