Skip to content

Commit

Permalink
Reduce debounce delay in settings search (#2126)
Browse files Browse the repository at this point in the history
  • Loading branch information
christian-byrne authored Jan 3, 2025
1 parent f53723d commit 2e7de47
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/components/dialog/content/SettingDialogContent.vue
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
v-model:modelValue="searchQuery"
@search="handleSearch"
:placeholder="$t('g.searchSettings') + '...'"
:debounce-time="128"
/>
<Listbox
v-model="activeCategory"
Expand All @@ -14,7 +15,7 @@
scrollHeight="100%"
:optionDisabled="
(option: SettingTreeNode) =>
inSearch && !searchResultsCategories.has(option.label)
!queryIsEmpty && !searchResultsCategories.has(option.label)
"
class="border-none w-full"
/>
Expand Down Expand Up @@ -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
)
Expand Down

0 comments on commit 2e7de47

Please sign in to comment.