@dolusoft/vue3-datatable 1.8.13 → 1.8.14
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/vue3-datatable.cjs +24 -6
- package/dist/vue3-datatable.js +24 -6
- package/package.json +1 -1
package/dist/vue3-datatable.cjs
CHANGED
|
@@ -3146,14 +3146,32 @@ const _sfc_main$1 = /* @__PURE__ */ vue.defineComponent({
|
|
|
3146
3146
|
});
|
|
3147
3147
|
};
|
|
3148
3148
|
const handleClearAllFilters = () => {
|
|
3149
|
+
var _a;
|
|
3149
3150
|
Object.keys(filterInputs.value).forEach((key) => {
|
|
3150
3151
|
filterInputs.value[key] = "";
|
|
3151
3152
|
});
|
|
3152
3153
|
Object.keys(columnConditions.value).forEach((key) => {
|
|
3153
3154
|
columnConditions.value[key] = "";
|
|
3154
3155
|
});
|
|
3156
|
+
if ((_a = props.all) == null ? void 0 : _a.columns) {
|
|
3157
|
+
props.all.columns.forEach((col) => {
|
|
3158
|
+
if (col.filter) {
|
|
3159
|
+
col.value = "";
|
|
3160
|
+
col.condition = "";
|
|
3161
|
+
}
|
|
3162
|
+
});
|
|
3163
|
+
}
|
|
3155
3164
|
emit("clearAllFilters");
|
|
3156
3165
|
};
|
|
3166
|
+
const hasAnyActiveFilterLocal = vue.computed(() => {
|
|
3167
|
+
const hasInputValue = Object.values(filterInputs.value).some(
|
|
3168
|
+
(val) => val !== "" && val !== null && val !== void 0
|
|
3169
|
+
);
|
|
3170
|
+
const hasConditionValue = Object.values(columnConditions.value).some(
|
|
3171
|
+
(val) => val !== "" && val !== null && val !== void 0
|
|
3172
|
+
);
|
|
3173
|
+
return hasInputValue || hasConditionValue;
|
|
3174
|
+
});
|
|
3157
3175
|
vue.watch(
|
|
3158
3176
|
() => {
|
|
3159
3177
|
var _a;
|
|
@@ -3256,9 +3274,9 @@ const _sfc_main$1 = /* @__PURE__ */ vue.defineComponent({
|
|
|
3256
3274
|
key: 0,
|
|
3257
3275
|
type: "button",
|
|
3258
3276
|
class: vue.normalizeClass(["bh-clear-all-button", {
|
|
3259
|
-
"bh-clear-all-button--active":
|
|
3277
|
+
"bh-clear-all-button--active": hasAnyActiveFilterLocal.value
|
|
3260
3278
|
}]),
|
|
3261
|
-
disabled: !
|
|
3279
|
+
disabled: !hasAnyActiveFilterLocal.value,
|
|
3262
3280
|
onClick: vue.withModifiers(handleClearAllFilters, ["stop"]),
|
|
3263
3281
|
title: "Clear all filters"
|
|
3264
3282
|
}, _hoisted_6$1, 10, _hoisted_4$1)) : vue.createCommentVNode("", true)
|
|
@@ -3281,9 +3299,9 @@ const _sfc_main$1 = /* @__PURE__ */ vue.defineComponent({
|
|
|
3281
3299
|
key: 0,
|
|
3282
3300
|
type: "button",
|
|
3283
3301
|
class: vue.normalizeClass(["bh-clear-all-button", {
|
|
3284
|
-
"bh-clear-all-button--active":
|
|
3302
|
+
"bh-clear-all-button--active": hasAnyActiveFilterLocal.value
|
|
3285
3303
|
}]),
|
|
3286
|
-
disabled: !
|
|
3304
|
+
disabled: !hasAnyActiveFilterLocal.value,
|
|
3287
3305
|
onClick: vue.withModifiers(handleClearAllFilters, ["stop"]),
|
|
3288
3306
|
title: "Clear all filters"
|
|
3289
3307
|
}, _hoisted_10$1, 10, _hoisted_8$1)) : vue.createCommentVNode("", true)
|
|
@@ -3306,9 +3324,9 @@ const _sfc_main$1 = /* @__PURE__ */ vue.defineComponent({
|
|
|
3306
3324
|
key: 0,
|
|
3307
3325
|
type: "button",
|
|
3308
3326
|
class: vue.normalizeClass(["bh-clear-all-button", {
|
|
3309
|
-
"bh-clear-all-button--active":
|
|
3327
|
+
"bh-clear-all-button--active": hasAnyActiveFilterLocal.value
|
|
3310
3328
|
}]),
|
|
3311
|
-
disabled: !
|
|
3329
|
+
disabled: !hasAnyActiveFilterLocal.value,
|
|
3312
3330
|
onClick: vue.withModifiers(handleClearAllFilters, ["stop"]),
|
|
3313
3331
|
title: "Clear all filters"
|
|
3314
3332
|
}, _hoisted_14$1, 10, _hoisted_12$1)) : vue.createCommentVNode("", true)
|
package/dist/vue3-datatable.js
CHANGED
|
@@ -3145,14 +3145,32 @@ const _sfc_main$1 = /* @__PURE__ */ defineComponent({
|
|
|
3145
3145
|
});
|
|
3146
3146
|
};
|
|
3147
3147
|
const handleClearAllFilters = () => {
|
|
3148
|
+
var _a;
|
|
3148
3149
|
Object.keys(filterInputs.value).forEach((key) => {
|
|
3149
3150
|
filterInputs.value[key] = "";
|
|
3150
3151
|
});
|
|
3151
3152
|
Object.keys(columnConditions.value).forEach((key) => {
|
|
3152
3153
|
columnConditions.value[key] = "";
|
|
3153
3154
|
});
|
|
3155
|
+
if ((_a = props.all) == null ? void 0 : _a.columns) {
|
|
3156
|
+
props.all.columns.forEach((col) => {
|
|
3157
|
+
if (col.filter) {
|
|
3158
|
+
col.value = "";
|
|
3159
|
+
col.condition = "";
|
|
3160
|
+
}
|
|
3161
|
+
});
|
|
3162
|
+
}
|
|
3154
3163
|
emit("clearAllFilters");
|
|
3155
3164
|
};
|
|
3165
|
+
const hasAnyActiveFilterLocal = computed(() => {
|
|
3166
|
+
const hasInputValue = Object.values(filterInputs.value).some(
|
|
3167
|
+
(val) => val !== "" && val !== null && val !== void 0
|
|
3168
|
+
);
|
|
3169
|
+
const hasConditionValue = Object.values(columnConditions.value).some(
|
|
3170
|
+
(val) => val !== "" && val !== null && val !== void 0
|
|
3171
|
+
);
|
|
3172
|
+
return hasInputValue || hasConditionValue;
|
|
3173
|
+
});
|
|
3156
3174
|
watch(
|
|
3157
3175
|
() => {
|
|
3158
3176
|
var _a;
|
|
@@ -3255,9 +3273,9 @@ const _sfc_main$1 = /* @__PURE__ */ defineComponent({
|
|
|
3255
3273
|
key: 0,
|
|
3256
3274
|
type: "button",
|
|
3257
3275
|
class: normalizeClass(["bh-clear-all-button", {
|
|
3258
|
-
"bh-clear-all-button--active":
|
|
3276
|
+
"bh-clear-all-button--active": hasAnyActiveFilterLocal.value
|
|
3259
3277
|
}]),
|
|
3260
|
-
disabled: !
|
|
3278
|
+
disabled: !hasAnyActiveFilterLocal.value,
|
|
3261
3279
|
onClick: withModifiers(handleClearAllFilters, ["stop"]),
|
|
3262
3280
|
title: "Clear all filters"
|
|
3263
3281
|
}, _hoisted_6$1, 10, _hoisted_4$1)) : createCommentVNode("", true)
|
|
@@ -3280,9 +3298,9 @@ const _sfc_main$1 = /* @__PURE__ */ defineComponent({
|
|
|
3280
3298
|
key: 0,
|
|
3281
3299
|
type: "button",
|
|
3282
3300
|
class: normalizeClass(["bh-clear-all-button", {
|
|
3283
|
-
"bh-clear-all-button--active":
|
|
3301
|
+
"bh-clear-all-button--active": hasAnyActiveFilterLocal.value
|
|
3284
3302
|
}]),
|
|
3285
|
-
disabled: !
|
|
3303
|
+
disabled: !hasAnyActiveFilterLocal.value,
|
|
3286
3304
|
onClick: withModifiers(handleClearAllFilters, ["stop"]),
|
|
3287
3305
|
title: "Clear all filters"
|
|
3288
3306
|
}, _hoisted_10$1, 10, _hoisted_8$1)) : createCommentVNode("", true)
|
|
@@ -3305,9 +3323,9 @@ const _sfc_main$1 = /* @__PURE__ */ defineComponent({
|
|
|
3305
3323
|
key: 0,
|
|
3306
3324
|
type: "button",
|
|
3307
3325
|
class: normalizeClass(["bh-clear-all-button", {
|
|
3308
|
-
"bh-clear-all-button--active":
|
|
3326
|
+
"bh-clear-all-button--active": hasAnyActiveFilterLocal.value
|
|
3309
3327
|
}]),
|
|
3310
|
-
disabled: !
|
|
3328
|
+
disabled: !hasAnyActiveFilterLocal.value,
|
|
3311
3329
|
onClick: withModifiers(handleClearAllFilters, ["stop"]),
|
|
3312
3330
|
title: "Clear all filters"
|
|
3313
3331
|
}, _hoisted_14$1, 10, _hoisted_12$1)) : createCommentVNode("", true)
|