From 26cdae23840e8d45cd7802e89dec6ac4d183e4b9 Mon Sep 17 00:00:00 2001 From: Jon Date: Fri, 19 Jul 2024 08:18:41 +0200 Subject: [PATCH] refactor: refs #7323 hidden column filter proposal --- src/components/ui/VnFilterPanel.vue | 17 ++++------------- src/pages/Worker/WorkerList.vue | 1 + 2 files changed, 5 insertions(+), 13 deletions(-) diff --git a/src/components/ui/VnFilterPanel.vue b/src/components/ui/VnFilterPanel.vue index 348ec8eea..b93ca7121 100644 --- a/src/components/ui/VnFilterPanel.vue +++ b/src/components/ui/VnFilterPanel.vue @@ -108,20 +108,11 @@ const isLoading = ref(false); async function search(evt) { if (evt && $props.disableSubmitEvent) return; - store.filter.where = Object.entries($props.modelValue).reduce((acc, [key, val]) => { - if (key.indexOf('.') > 0) { - acc[key] = val; - } - return acc; - }, {}); + store.filter.where = {}; isLoading.value = true; - const filter = { - ...userParams.value, - }; + const filter = { ...userParams.value }; store.userParamsChanged = true; - const { params: newParams } = await arrayData.addFilter({ - params: userParams.value, - }); + const { params: newParams } = await arrayData.addFilter({ params: userParams.value }); userParams.value = newParams; if (!$props.showAll && !Object.values(filter).length) store.data = []; @@ -206,7 +197,7 @@ function formatValue(value) { color="primary" style="position: fixed; z-index: 1; right: 0; bottom: 0" icon="search" - @click="search($event)" + @click="search()" > diff --git a/src/pages/Worker/WorkerList.vue b/src/pages/Worker/WorkerList.vue index 498ad74e6..0c2656597 100644 --- a/src/pages/Worker/WorkerList.vue +++ b/src/pages/Worker/WorkerList.vue @@ -71,6 +71,7 @@ const columns = computed(() => [ alias: 'mu', inWhere: true, }, + hidden: true, }, { align: 'right',