From 6d116b9798b97d850f367be388f81cea6db50f88 Mon Sep 17 00:00:00 2001 From: jorgep Date: Wed, 11 Oct 2023 10:54:11 +0200 Subject: [PATCH] ref #5417 search and refresh fixed --- src/components/ui/VnFilterPanel.vue | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/src/components/ui/VnFilterPanel.vue b/src/components/ui/VnFilterPanel.vue index c7be929fb..d7ef92df9 100644 --- a/src/components/ui/VnFilterPanel.vue +++ b/src/components/ui/VnFilterPanel.vue @@ -51,9 +51,8 @@ async function search() { } isLoading.value = true; await arrayData.addFilter({ params }); - if (!props.showAll && !Object.values(userParams.value).find((param) => param)) { - store.data = []; - } + if (!props.showAll && !Object.values(store.userParams).length) store.data = []; + isLoading.value = false; } @@ -61,8 +60,7 @@ async function reload() { isLoading.value = true; await arrayData.fetch({ append: false }); - if (!props.showAll && !Object.values(userParams.value).find((param) => param)) - store.data = []; + if (!props.showAll && !Object.values(store.userParams).length) store.data = []; isLoading.value = false; emit('refresh'); }