From 564e1f0c9475efdaab1776c9a5c7831cc7a9b1ee Mon Sep 17 00:00:00 2001 From: mertmit Date: Thu, 20 Oct 2022 17:36:38 +0300 Subject: [PATCH] fix: hide base if no result for search query Signed-off-by: mertmit --- packages/nc-gui/components/dashboard/TreeView.vue | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/packages/nc-gui/components/dashboard/TreeView.vue b/packages/nc-gui/components/dashboard/TreeView.vue index f4ab77189f..97c14475fd 100644 --- a/packages/nc-gui/components/dashboard/TreeView.vue +++ b/packages/nc-gui/components/dashboard/TreeView.vue @@ -64,7 +64,9 @@ const tablesById = $computed(() => ) const filteredTables = $computed(() => - tables.value?.filter((table) => !filterQuery || table.title.toLowerCase().includes(filterQuery.toLowerCase())), + tables.value?.filter( + (table) => !searchActive.value || !filterQuery || table.title.toLowerCase().includes(filterQuery.toLowerCase()), + ), ) const filteredBases = $computed(() => bases.value.filter((base) => base.enabled)) @@ -470,7 +472,15 @@ useEventListener(document, 'keydown', async (e: KeyboardEvent) => { - +