@dolusoft/vue3-datatable 1.8.51 → 1.8.53

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.
@@ -5541,6 +5541,23 @@ const _sfc_main$2 = /* @__PURE__ */ vue.defineComponent({
5541
5541
  clearTimeout(existingTimer);
5542
5542
  debounceTimers.set(col.field, null);
5543
5543
  }
5544
+ if (!isEmpty && (column.type === "string" || column.type === "String") && typeof newValue === "string") {
5545
+ const v2 = newValue.trim();
5546
+ if (v2 === "*" || v2 === "!*") {
5547
+ const hint = v2.startsWith("!") ? "NotContains" : "Contains";
5548
+ column.condition = hint;
5549
+ columnConditions.value[col.field] = hint;
5550
+ } else if (v2 === "!") {
5551
+ column.condition = "NotEqual";
5552
+ columnConditions.value[col.field] = "NotEqual";
5553
+ } else {
5554
+ const parsed = parseFilterInput(v2);
5555
+ if (parsed.isOperatorDetected && parsed.rules.length > 0) {
5556
+ column.condition = parsed.rules[0].condition;
5557
+ columnConditions.value[col.field] = parsed.rules[0].condition;
5558
+ }
5559
+ }
5560
+ }
5544
5561
  const processChange = () => {
5545
5562
  debounceTimers.set(col.field, null);
5546
5563
  if (isEmpty) {
@@ -5552,10 +5569,8 @@ const _sfc_main$2 = /* @__PURE__ */ vue.defineComponent({
5552
5569
  if ((column.type === "string" || column.type === "String") && typeof newValue === "string") {
5553
5570
  const parsed = parseFilterInput(newValue);
5554
5571
  if (parsed.isOperatorDetected && parsed.rules.length > 0) {
5555
- column.value = parsed.rules[0].value;
5556
- column.condition = parsed.rules[0].condition;
5557
- columnConditions.value[col.field] = parsed.rules[0].condition;
5558
- column.parsedFilterRules = parsed.rules.length > 1 ? parsed.rules : void 0;
5572
+ column.value = newValue.trim();
5573
+ column.parsedFilterRules = parsed.rules;
5559
5574
  emit("filterChange");
5560
5575
  return;
5561
5576
  }
@@ -5540,6 +5540,23 @@ const _sfc_main$2 = /* @__PURE__ */ defineComponent({
5540
5540
  clearTimeout(existingTimer);
5541
5541
  debounceTimers.set(col.field, null);
5542
5542
  }
5543
+ if (!isEmpty && (column.type === "string" || column.type === "String") && typeof newValue === "string") {
5544
+ const v2 = newValue.trim();
5545
+ if (v2 === "*" || v2 === "!*") {
5546
+ const hint = v2.startsWith("!") ? "NotContains" : "Contains";
5547
+ column.condition = hint;
5548
+ columnConditions.value[col.field] = hint;
5549
+ } else if (v2 === "!") {
5550
+ column.condition = "NotEqual";
5551
+ columnConditions.value[col.field] = "NotEqual";
5552
+ } else {
5553
+ const parsed = parseFilterInput(v2);
5554
+ if (parsed.isOperatorDetected && parsed.rules.length > 0) {
5555
+ column.condition = parsed.rules[0].condition;
5556
+ columnConditions.value[col.field] = parsed.rules[0].condition;
5557
+ }
5558
+ }
5559
+ }
5543
5560
  const processChange = () => {
5544
5561
  debounceTimers.set(col.field, null);
5545
5562
  if (isEmpty) {
@@ -5551,10 +5568,8 @@ const _sfc_main$2 = /* @__PURE__ */ defineComponent({
5551
5568
  if ((column.type === "string" || column.type === "String") && typeof newValue === "string") {
5552
5569
  const parsed = parseFilterInput(newValue);
5553
5570
  if (parsed.isOperatorDetected && parsed.rules.length > 0) {
5554
- column.value = parsed.rules[0].value;
5555
- column.condition = parsed.rules[0].condition;
5556
- columnConditions.value[col.field] = parsed.rules[0].condition;
5557
- column.parsedFilterRules = parsed.rules.length > 1 ? parsed.rules : void 0;
5571
+ column.value = newValue.trim();
5572
+ column.parsedFilterRules = parsed.rules;
5558
5573
  emit("filterChange");
5559
5574
  return;
5560
5575
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@dolusoft/vue3-datatable",
3
- "version": "1.8.51",
3
+ "version": "1.8.53",
4
4
  "description": "Vue3 Datatable - fully customizable & easy to use datatable library",
5
5
  "private": false,
6
6
  "type": "module",