@amirjalili1374/ui-kit 1.5.46 → 1.5.48
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/ui-kit.es.js
CHANGED
|
@@ -18331,8 +18331,20 @@ const _sfc_main$f = /* @__PURE__ */ defineComponent$1({
|
|
|
18331
18331
|
},
|
|
18332
18332
|
emits: ["update:selectedItems", "selection-change"],
|
|
18333
18333
|
setup(__props, { expose: __expose, emit: __emit }) {
|
|
18334
|
+
const filters = reactive({});
|
|
18335
|
+
const initialized = ref(false);
|
|
18334
18336
|
const props = __props;
|
|
18335
18337
|
const emit = __emit;
|
|
18338
|
+
watch(filters, () => {
|
|
18339
|
+
if (props.autoFetch && initialized.value) {
|
|
18340
|
+
fetchData();
|
|
18341
|
+
}
|
|
18342
|
+
});
|
|
18343
|
+
const externalCriteria = ref({});
|
|
18344
|
+
const getFilters = () => ({ ...cleanFilterModel.value });
|
|
18345
|
+
const setCriteria = (criteria) => {
|
|
18346
|
+
externalCriteria.value = { ...criteria || {} };
|
|
18347
|
+
};
|
|
18336
18348
|
const items = ref([]);
|
|
18337
18349
|
const originalServerData = ref([]);
|
|
18338
18350
|
const loading = ref(false);
|
|
@@ -18755,9 +18767,11 @@ const _sfc_main$f = /* @__PURE__ */ defineComponent$1({
|
|
|
18755
18767
|
try {
|
|
18756
18768
|
const rawFilter = buildFilterParams();
|
|
18757
18769
|
const finalFilter = resolveFilter(rawFilter);
|
|
18770
|
+
const hasExternalCriteria = externalCriteria.value && Object.keys(externalCriteria.value).length > 0;
|
|
18758
18771
|
let params = {
|
|
18759
|
-
...finalFilter,
|
|
18760
|
-
...props.queryParams
|
|
18772
|
+
...hasExternalCriteria ? {} : finalFilter,
|
|
18773
|
+
...props.queryParams,
|
|
18774
|
+
...externalCriteria.value || {}
|
|
18761
18775
|
};
|
|
18762
18776
|
if (queryParams) {
|
|
18763
18777
|
params = {
|
|
@@ -18891,7 +18905,9 @@ const _sfc_main$f = /* @__PURE__ */ defineComponent$1({
|
|
|
18891
18905
|
toggleGroup,
|
|
18892
18906
|
expandAllGroups,
|
|
18893
18907
|
collapseAllGroups,
|
|
18894
|
-
formModel
|
|
18908
|
+
formModel,
|
|
18909
|
+
getFilters,
|
|
18910
|
+
setCriteria
|
|
18895
18911
|
});
|
|
18896
18912
|
const openDialog = (item) => {
|
|
18897
18913
|
editedItem.value = item ? { ...item } : {};
|
|
@@ -19254,6 +19270,7 @@ const _sfc_main$f = /* @__PURE__ */ defineComponent$1({
|
|
|
19254
19270
|
if (props.autoFetch) {
|
|
19255
19271
|
fetchData();
|
|
19256
19272
|
}
|
|
19273
|
+
initialized.value = true;
|
|
19257
19274
|
});
|
|
19258
19275
|
const openCustomActionDialog = (action, item) => {
|
|
19259
19276
|
customActionComponent.value = action.component;
|