From 2e7de4701e0d892165f8e38fec500524a769f349 Mon Sep 17 00:00:00 2001 From: bymyself Date: Thu, 2 Jan 2025 17:51:31 -0700 Subject: [PATCH] Reduce debounce delay in settings search (#2126) --- src/components/dialog/content/SettingDialogContent.vue | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/components/dialog/content/SettingDialogContent.vue b/src/components/dialog/content/SettingDialogContent.vue index b5711f232..afacf353e 100644 --- a/src/components/dialog/content/SettingDialogContent.vue +++ b/src/components/dialog/content/SettingDialogContent.vue @@ -6,6 +6,7 @@ v-model:modelValue="searchQuery" @search="handleSearch" :placeholder="$t('g.searchSettings') + '...'" + :debounce-time="128" /> @@ -263,9 +264,8 @@ const handleSearch = (query: string) => { activeCategory.value = null } -const inSearch = computed( - () => searchQuery.value.length > 0 && !searchInProgress.value -) +const queryIsEmpty = computed(() => searchQuery.value.length === 0) +const inSearch = computed(() => !queryIsEmpty.value && !searchInProgress.value) const tabValue = computed(() => inSearch.value ? 'Search Results' : activeCategory.value?.label )