From ff9bd2e1e6b266bb05424575be897c0add4e8f5f Mon Sep 17 00:00:00 2001 From: jorgep Date: Wed, 18 Oct 2023 12:29:56 +0200 Subject: [PATCH] ref #5417 filter fixed --- src/components/ui/VnFilterPanel.vue | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/components/ui/VnFilterPanel.vue b/src/components/ui/VnFilterPanel.vue index 31731b8b0..d78c3ba13 100644 --- a/src/components/ui/VnFilterPanel.vue +++ b/src/components/ui/VnFilterPanel.vue @@ -41,13 +41,13 @@ onMounted(() => { const isLoading = ref(false); async function search() { - const params = JSON.parse(JSON.stringify(userParams.value)); - for (const param in params) { - if (params[param] === '' || params[param] === null) { + for (const param in userParams.value) { + if (userParams.value[param] === '' || userParams.value[param] === null) { delete userParams.value[param]; delete store.userParams[param]; } } + const params = { ...userParams.value }; isLoading.value = true; await arrayData.addFilter({ params }); if (!props.showAll && !Object.values(params).length) store.data = [];