forked from verdnatura/salix-front
ref #5417 filter fixed
This commit is contained in:
parent
59b5daed51
commit
ff9bd2e1e6
|
@ -41,13 +41,13 @@ onMounted(() => {
|
||||||
|
|
||||||
const isLoading = ref(false);
|
const isLoading = ref(false);
|
||||||
async function search() {
|
async function search() {
|
||||||
const params = JSON.parse(JSON.stringify(userParams.value));
|
for (const param in userParams.value) {
|
||||||
for (const param in params) {
|
if (userParams.value[param] === '' || userParams.value[param] === null) {
|
||||||
if (params[param] === '' || params[param] === null) {
|
|
||||||
delete userParams.value[param];
|
delete userParams.value[param];
|
||||||
delete store.userParams[param];
|
delete store.userParams[param];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
const params = { ...userParams.value };
|
||||||
isLoading.value = true;
|
isLoading.value = true;
|
||||||
await arrayData.addFilter({ params });
|
await arrayData.addFilter({ params });
|
||||||
if (!props.showAll && !Object.values(params).length) store.data = [];
|
if (!props.showAll && !Object.values(params).length) store.data = [];
|
||||||
|
|
Loading…
Reference in New Issue