@dolusoft/vue3-datatable 1.8.31 → 1.8.32

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.
@@ -3043,7 +3043,8 @@ const _sfc_main$1 = /* @__PURE__ */ vue.defineComponent({
3043
3043
  "columnFilterLang",
3044
3044
  "hasFilterDatetimeSlot",
3045
3045
  "showClearAllButton",
3046
- "hasAnyActiveFilter"
3046
+ "hasAnyActiveFilter",
3047
+ "filterUpdateTrigger"
3047
3048
  ],
3048
3049
  emits: [
3049
3050
  "selectAll",
@@ -3193,6 +3194,23 @@ const _sfc_main$1 = /* @__PURE__ */ vue.defineComponent({
3193
3194
  },
3194
3195
  { deep: true, immediate: true }
3195
3196
  );
3197
+ vue.watch(
3198
+ () => props.filterUpdateTrigger,
3199
+ () => {
3200
+ var _a;
3201
+ if (!((_a = props.all) == null ? void 0 : _a.columns)) return;
3202
+ props.all.columns.forEach((col) => {
3203
+ if (col.field) {
3204
+ const colValue = col.value ?? "";
3205
+ const hasValue = colValue !== "" && colValue !== null && colValue !== void 0;
3206
+ filterInputs.value[col.field] = colValue;
3207
+ if (hasValue && col.condition) {
3208
+ columnConditions.value[col.field] = col.condition;
3209
+ }
3210
+ }
3211
+ });
3212
+ }
3213
+ );
3196
3214
  vue.onMounted(() => {
3197
3215
  setupColumnWatches();
3198
3216
  });
@@ -3826,6 +3844,7 @@ const _sfc_main = /* @__PURE__ */ vue.defineComponent({
3826
3844
  const currentSearch = vue.ref(props.search);
3827
3845
  JSON.parse(JSON.stringify(props.columns));
3828
3846
  const isOpenFilter = vue.ref(null);
3847
+ const filterUpdateTrigger = vue.ref(0);
3829
3848
  const timer = vue.ref(null);
3830
3849
  let clickCount = vue.ref(0);
3831
3850
  const delay = vue.ref(230);
@@ -4151,6 +4170,7 @@ const _sfc_main = /* @__PURE__ */ vue.defineComponent({
4151
4170
  if (column) {
4152
4171
  column.value = value;
4153
4172
  column.condition = condition || "Equal";
4173
+ filterUpdateTrigger.value++;
4154
4174
  updateHasAnyActiveFilter();
4155
4175
  if (triggerFilter) {
4156
4176
  filterChange();
@@ -4660,6 +4680,7 @@ const _sfc_main = /* @__PURE__ */ vue.defineComponent({
4660
4680
  hasFilterDatetimeSlot: hasFilterDatetimeSlot.value,
4661
4681
  showClearAllButton: props.showClearAllButton,
4662
4682
  hasAnyActiveFilter: hasAnyActiveFilter.value,
4683
+ filterUpdateTrigger: filterUpdateTrigger.value,
4663
4684
  onSelectAll: selectAll,
4664
4685
  onSortChange: sortChange,
4665
4686
  onFilterChange: filterChange,
@@ -4674,7 +4695,7 @@ const _sfc_main = /* @__PURE__ */ vue.defineComponent({
4674
4695
  ]),
4675
4696
  key: "0"
4676
4697
  } : void 0
4677
- ]), 1032, ["expandedrows", "currentSortColumn", "currentSortDirection", "isOpenFilter", "checkAll", "columnFilterLang", "hasFilterDatetimeSlot", "showClearAllButton", "hasAnyActiveFilter"])
4698
+ ]), 1032, ["expandedrows", "currentSortColumn", "currentSortDirection", "isOpenFilter", "checkAll", "columnFilterLang", "hasFilterDatetimeSlot", "showClearAllButton", "hasAnyActiveFilter", "filterUpdateTrigger"])
4678
4699
  ], 2),
4679
4700
  vue.createElementVNode("tbody", null, [
4680
4701
  (vue.openBlock(true), vue.createElementBlock(vue.Fragment, null, vue.renderList(filterItems.value, (item, i) => {
@@ -4933,6 +4954,7 @@ const _sfc_main = /* @__PURE__ */ vue.defineComponent({
4933
4954
  hasFilterDatetimeSlot: hasFilterDatetimeSlot.value,
4934
4955
  showClearAllButton: props.showClearAllButton,
4935
4956
  hasAnyActiveFilter: hasAnyActiveFilter.value,
4957
+ filterUpdateTrigger: filterUpdateTrigger.value,
4936
4958
  onSelectAll: selectAll,
4937
4959
  onSortChange: sortChange,
4938
4960
  onFilterChange: filterChange,
@@ -4947,7 +4969,7 @@ const _sfc_main = /* @__PURE__ */ vue.defineComponent({
4947
4969
  ]),
4948
4970
  key: "0"
4949
4971
  } : void 0
4950
- ]), 1032, ["expandedrows", "currentSortColumn", "currentSortDirection", "isOpenFilter", "checkAll", "columnFilterLang", "hasFilterDatetimeSlot", "showClearAllButton", "hasAnyActiveFilter"])
4972
+ ]), 1032, ["expandedrows", "currentSortColumn", "currentSortDirection", "isOpenFilter", "checkAll", "columnFilterLang", "hasFilterDatetimeSlot", "showClearAllButton", "hasAnyActiveFilter", "filterUpdateTrigger"])
4951
4973
  ], 2),
4952
4974
  vue.createElementVNode("tbody", null, [
4953
4975
  (vue.openBlock(true), vue.createElementBlock(vue.Fragment, null, vue.renderList(filterItems.value, (item, i) => {
@@ -3042,7 +3042,8 @@ const _sfc_main$1 = /* @__PURE__ */ defineComponent({
3042
3042
  "columnFilterLang",
3043
3043
  "hasFilterDatetimeSlot",
3044
3044
  "showClearAllButton",
3045
- "hasAnyActiveFilter"
3045
+ "hasAnyActiveFilter",
3046
+ "filterUpdateTrigger"
3046
3047
  ],
3047
3048
  emits: [
3048
3049
  "selectAll",
@@ -3192,6 +3193,23 @@ const _sfc_main$1 = /* @__PURE__ */ defineComponent({
3192
3193
  },
3193
3194
  { deep: true, immediate: true }
3194
3195
  );
3196
+ watch(
3197
+ () => props.filterUpdateTrigger,
3198
+ () => {
3199
+ var _a;
3200
+ if (!((_a = props.all) == null ? void 0 : _a.columns)) return;
3201
+ props.all.columns.forEach((col) => {
3202
+ if (col.field) {
3203
+ const colValue = col.value ?? "";
3204
+ const hasValue = colValue !== "" && colValue !== null && colValue !== void 0;
3205
+ filterInputs.value[col.field] = colValue;
3206
+ if (hasValue && col.condition) {
3207
+ columnConditions.value[col.field] = col.condition;
3208
+ }
3209
+ }
3210
+ });
3211
+ }
3212
+ );
3195
3213
  onMounted(() => {
3196
3214
  setupColumnWatches();
3197
3215
  });
@@ -3825,6 +3843,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
3825
3843
  const currentSearch = ref(props.search);
3826
3844
  JSON.parse(JSON.stringify(props.columns));
3827
3845
  const isOpenFilter = ref(null);
3846
+ const filterUpdateTrigger = ref(0);
3828
3847
  const timer = ref(null);
3829
3848
  let clickCount = ref(0);
3830
3849
  const delay = ref(230);
@@ -4150,6 +4169,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
4150
4169
  if (column) {
4151
4170
  column.value = value;
4152
4171
  column.condition = condition || "Equal";
4172
+ filterUpdateTrigger.value++;
4153
4173
  updateHasAnyActiveFilter();
4154
4174
  if (triggerFilter) {
4155
4175
  filterChange();
@@ -4659,6 +4679,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
4659
4679
  hasFilterDatetimeSlot: hasFilterDatetimeSlot.value,
4660
4680
  showClearAllButton: props.showClearAllButton,
4661
4681
  hasAnyActiveFilter: hasAnyActiveFilter.value,
4682
+ filterUpdateTrigger: filterUpdateTrigger.value,
4662
4683
  onSelectAll: selectAll,
4663
4684
  onSortChange: sortChange,
4664
4685
  onFilterChange: filterChange,
@@ -4673,7 +4694,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
4673
4694
  ]),
4674
4695
  key: "0"
4675
4696
  } : void 0
4676
- ]), 1032, ["expandedrows", "currentSortColumn", "currentSortDirection", "isOpenFilter", "checkAll", "columnFilterLang", "hasFilterDatetimeSlot", "showClearAllButton", "hasAnyActiveFilter"])
4697
+ ]), 1032, ["expandedrows", "currentSortColumn", "currentSortDirection", "isOpenFilter", "checkAll", "columnFilterLang", "hasFilterDatetimeSlot", "showClearAllButton", "hasAnyActiveFilter", "filterUpdateTrigger"])
4677
4698
  ], 2),
4678
4699
  createElementVNode("tbody", null, [
4679
4700
  (openBlock(true), createElementBlock(Fragment, null, renderList(filterItems.value, (item, i) => {
@@ -4932,6 +4953,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
4932
4953
  hasFilterDatetimeSlot: hasFilterDatetimeSlot.value,
4933
4954
  showClearAllButton: props.showClearAllButton,
4934
4955
  hasAnyActiveFilter: hasAnyActiveFilter.value,
4956
+ filterUpdateTrigger: filterUpdateTrigger.value,
4935
4957
  onSelectAll: selectAll,
4936
4958
  onSortChange: sortChange,
4937
4959
  onFilterChange: filterChange,
@@ -4946,7 +4968,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
4946
4968
  ]),
4947
4969
  key: "0"
4948
4970
  } : void 0
4949
- ]), 1032, ["expandedrows", "currentSortColumn", "currentSortDirection", "isOpenFilter", "checkAll", "columnFilterLang", "hasFilterDatetimeSlot", "showClearAllButton", "hasAnyActiveFilter"])
4971
+ ]), 1032, ["expandedrows", "currentSortColumn", "currentSortDirection", "isOpenFilter", "checkAll", "columnFilterLang", "hasFilterDatetimeSlot", "showClearAllButton", "hasAnyActiveFilter", "filterUpdateTrigger"])
4950
4972
  ], 2),
4951
4973
  createElementVNode("tbody", null, [
4952
4974
  (openBlock(true), createElementBlock(Fragment, null, renderList(filterItems.value, (item, i) => {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@dolusoft/vue3-datatable",
3
- "version": "1.8.31",
3
+ "version": "1.8.32",
4
4
  "description": "Vue3 Datatable - fully customizable & easy to use datatable library",
5
5
  "private": false,
6
6
  "type": "module",