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; isLoading.value = true;
const filter = { ...userParams.value, ...$props.modelValue }; const filter = { ...userParams.value, ...$props.modelValue };
store.userParamsChanged = true; store.userParamsChanged = true;
try {
const { params: newParams } = await arrayData.addFilter({ const { params: newParams } = await arrayData.addFilter({
params: filter, params: filter,
}); });
userParams.value = newParams; 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'); emit('search');
} }