@dolusoft/vue3-datatable 1.8.16 → 1.8.17
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 +14 -18
- package/dist/vue3-datatable.js +14 -18
- package/package.json +1 -1
package/dist/vue3-datatable.cjs
CHANGED
|
@@ -3124,25 +3124,21 @@ const _sfc_main$1 = /* @__PURE__ */ vue.defineComponent({
|
|
|
3124
3124
|
() => filterInputs.value[col.field],
|
|
3125
3125
|
(newValue) => {
|
|
3126
3126
|
const column = columnsMap.value.get(col.field);
|
|
3127
|
-
|
|
3128
|
-
|
|
3129
|
-
|
|
3130
|
-
|
|
3131
|
-
|
|
3132
|
-
|
|
3133
|
-
}
|
|
3134
|
-
const isEmpty = newValue === "" || newValue === null || newValue === void 0;
|
|
3135
|
-
if (isEmpty) {
|
|
3136
|
-
column.condition = "";
|
|
3137
|
-
columnConditions.value[col.field] = "";
|
|
3138
|
-
} else if (currentCondition) {
|
|
3139
|
-
column.condition = currentCondition;
|
|
3140
|
-
} else {
|
|
3141
|
-
column.condition = "Equal";
|
|
3142
|
-
columnConditions.value[col.field] = column.condition;
|
|
3143
|
-
}
|
|
3144
|
-
emit("filterChange");
|
|
3127
|
+
if (!column) return;
|
|
3128
|
+
const isEmpty = newValue === "" || newValue === null || newValue === void 0;
|
|
3129
|
+
if (column.type === "string" || column.type === "String") {
|
|
3130
|
+
column.value = isEmpty ? "" : typeof newValue === "string" ? newValue.trim() : newValue;
|
|
3131
|
+
} else {
|
|
3132
|
+
column.value = isEmpty ? "" : newValue;
|
|
3145
3133
|
}
|
|
3134
|
+
if (isEmpty) {
|
|
3135
|
+
column.condition = "";
|
|
3136
|
+
columnConditions.value[col.field] = "";
|
|
3137
|
+
} else if (!columnConditions.value[col.field]) {
|
|
3138
|
+
column.condition = "Equal";
|
|
3139
|
+
columnConditions.value[col.field] = "Equal";
|
|
3140
|
+
}
|
|
3141
|
+
emit("filterChange");
|
|
3146
3142
|
},
|
|
3147
3143
|
{ debounce: 300 }
|
|
3148
3144
|
);
|
package/dist/vue3-datatable.js
CHANGED
|
@@ -3123,25 +3123,21 @@ const _sfc_main$1 = /* @__PURE__ */ defineComponent({
|
|
|
3123
3123
|
() => filterInputs.value[col.field],
|
|
3124
3124
|
(newValue) => {
|
|
3125
3125
|
const column = columnsMap.value.get(col.field);
|
|
3126
|
-
|
|
3127
|
-
|
|
3128
|
-
|
|
3129
|
-
|
|
3130
|
-
|
|
3131
|
-
|
|
3132
|
-
}
|
|
3133
|
-
const isEmpty = newValue === "" || newValue === null || newValue === void 0;
|
|
3134
|
-
if (isEmpty) {
|
|
3135
|
-
column.condition = "";
|
|
3136
|
-
columnConditions.value[col.field] = "";
|
|
3137
|
-
} else if (currentCondition) {
|
|
3138
|
-
column.condition = currentCondition;
|
|
3139
|
-
} else {
|
|
3140
|
-
column.condition = "Equal";
|
|
3141
|
-
columnConditions.value[col.field] = column.condition;
|
|
3142
|
-
}
|
|
3143
|
-
emit("filterChange");
|
|
3126
|
+
if (!column) return;
|
|
3127
|
+
const isEmpty = newValue === "" || newValue === null || newValue === void 0;
|
|
3128
|
+
if (column.type === "string" || column.type === "String") {
|
|
3129
|
+
column.value = isEmpty ? "" : typeof newValue === "string" ? newValue.trim() : newValue;
|
|
3130
|
+
} else {
|
|
3131
|
+
column.value = isEmpty ? "" : newValue;
|
|
3144
3132
|
}
|
|
3133
|
+
if (isEmpty) {
|
|
3134
|
+
column.condition = "";
|
|
3135
|
+
columnConditions.value[col.field] = "";
|
|
3136
|
+
} else if (!columnConditions.value[col.field]) {
|
|
3137
|
+
column.condition = "Equal";
|
|
3138
|
+
columnConditions.value[col.field] = "Equal";
|
|
3139
|
+
}
|
|
3140
|
+
emit("filterChange");
|
|
3145
3141
|
},
|
|
3146
3142
|
{ debounce: 300 }
|
|
3147
3143
|
);
|