@wishbone-media/spark 0.16.0 → 0.16.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.js
CHANGED
|
@@ -899,7 +899,7 @@ const U = new vs(), bs = { class: "fixed inset-0 z-10 w-screen overflow-y-auto"
|
|
|
899
899
|
}, 200);
|
|
900
900
|
l.addEventListener("keyup", (o) => r(e, o)), s.appendChild(a);
|
|
901
901
|
}, Hs = (e, s, t) => {
|
|
902
|
-
e.classList.add("spark-table-head"),
|
|
902
|
+
e.classList.add("spark-table-head"), t && t.columnSort && e.classList.add("can-sort"), t && t.columnFilter && e.classList.add("can-filter"), e.querySelector(".relative").classList.add("spark-table-head-title-wrapper");
|
|
903
903
|
const l = e.querySelector(".colHeader");
|
|
904
904
|
l.classList.add("spark-table-head-title"), l.innerHTML = Ss(s);
|
|
905
905
|
}, Ts = (e, s, t) => {
|
|
@@ -909,7 +909,7 @@ const U = new vs(), bs = { class: "fixed inset-0 z-10 w-screen overflow-y-auto"
|
|
|
909
909
|
return;
|
|
910
910
|
let a = 2;
|
|
911
911
|
const l = t.methods.colToProp(e), r = t.methods.getSettingsForProp(l);
|
|
912
|
-
s.childElementCount === 1 && (r
|
|
912
|
+
s.childElementCount === 1 && ((!r || !r.columnSort) && a--, (!r || !r.columnFilter) && a--, r && r.columnSort && $s(l, s, t), r && r.columnFilter && Ls(l, s, t)), (s.childElementCount === a || a === 0) && Hs(s, l, r);
|
|
913
913
|
}, Vs = (e) => {
|
|
914
914
|
if (!e.hotInstance || !e.hotInstance.rootElement)
|
|
915
915
|
return;
|
package/package.json
CHANGED
|
@@ -84,11 +84,11 @@ const customFilter = (prop, th, sparkTable) => {
|
|
|
84
84
|
const initAppTableHeader = (th, prop, columnSettings) => {
|
|
85
85
|
th.classList.add('spark-table-head')
|
|
86
86
|
|
|
87
|
-
if (
|
|
87
|
+
if (columnSettings && columnSettings.columnSort) {
|
|
88
88
|
th.classList.add('can-sort')
|
|
89
89
|
}
|
|
90
90
|
|
|
91
|
-
if (
|
|
91
|
+
if (columnSettings && columnSettings.columnFilter) {
|
|
92
92
|
th.classList.add('can-filter')
|
|
93
93
|
}
|
|
94
94
|
|
|
@@ -116,18 +116,18 @@ const customiseHeader = (col, th, sparkTable) => {
|
|
|
116
116
|
const columnSettings = sparkTable.methods.getSettingsForProp(prop)
|
|
117
117
|
|
|
118
118
|
if (th.childElementCount === 1) {
|
|
119
|
-
if (columnSettings
|
|
119
|
+
if (!columnSettings || !columnSettings.columnSort) {
|
|
120
120
|
childrenCount--
|
|
121
121
|
}
|
|
122
|
-
if (columnSettings
|
|
122
|
+
if (!columnSettings || !columnSettings.columnFilter) {
|
|
123
123
|
childrenCount--
|
|
124
124
|
}
|
|
125
125
|
|
|
126
|
-
if (
|
|
126
|
+
if (columnSettings && columnSettings.columnSort) {
|
|
127
127
|
customSort(prop, th, sparkTable)
|
|
128
128
|
}
|
|
129
129
|
|
|
130
|
-
if (
|
|
130
|
+
if (columnSettings && columnSettings.columnFilter) {
|
|
131
131
|
customFilter(prop, th, sparkTable)
|
|
132
132
|
}
|
|
133
133
|
}
|
|
@@ -27,9 +27,8 @@ import { icon } from '@fortawesome/fontawesome-svg-core'
|
|
|
27
27
|
* handler: (row) => downloadFile(row.file_url)
|
|
28
28
|
* }
|
|
29
29
|
* ]
|
|
30
|
-
* }
|
|
31
|
-
*
|
|
32
|
-
* hideFilter: true
|
|
30
|
+
* }
|
|
31
|
+
* // Note: columnSort and columnFilter are disabled by default for action columns
|
|
33
32
|
* }
|
|
34
33
|
*
|
|
35
34
|
* @typedef {Object} ActionConfig
|