0
0
Fork 0

fix: refs #6900 improve loading

This commit is contained in:
Jorge Penadés 2024-08-14 15:27:36 +02:00
parent 3bba5db1b5
commit ecfdf0b6b9
1 changed files with 9 additions and 6 deletions

View File

@ -117,14 +117,17 @@ async function search(evt) {
isLoading.value = true;
const filter = { ...userParams.value, ...$props.modelValue };
store.userParamsChanged = true;
const { params: newParams } = await arrayData.addFilter({
params: filter,
});
userParams.value = newParams;
try {
const { params: newParams } = await arrayData.addFilter({
params: filter,
});
userParams.value = newParams;
if (!$props.showAll && !Object.values(filter).length) store.data = [];
if (!$props.showAll && !Object.values(filter).length) store.data = [];
} finally {
isLoading.value = false;
}
isLoading.value = false;
emit('search');
}