From 4b5c9db722005055f5a54a8c91edb8e47a293806 Mon Sep 17 00:00:00 2001 From: Pranav C Date: Mon, 7 Nov 2022 15:43:04 +0530 Subject: [PATCH] refactor: replace inline function Signed-off-by: Pranav C --- .../nc-gui/components/dashboard/TreeView.vue | 18 +++++++----------- 1 file changed, 7 insertions(+), 11 deletions(-) diff --git a/packages/nc-gui/components/dashboard/TreeView.vue b/packages/nc-gui/components/dashboard/TreeView.vue index 50a79b977b..f57eaabfc4 100644 --- a/packages/nc-gui/components/dashboard/TreeView.vue +++ b/packages/nc-gui/components/dashboard/TreeView.vue @@ -41,7 +41,7 @@ let key = $ref(0) const menuRef = $ref() -const filterQuery = $ref('') +let filterQuery = $ref('') const activeTable = computed(() => ([TabType.TABLE, TabType.VIEW].includes(activeTab.value?.type) ? activeTab.value.title : null)) @@ -211,6 +211,11 @@ function openTableCreateDialog() { } const searchInputRef: VNodeRef = (vnode: typeof Input) => vnode?.$el?.focus() + +const onSearchCloseIconClick = () => { + filterQuery = '' + toggleSearchActive(false) +}