mirror of
https://github.com/Comfy-Org/ComfyUI_frontend.git
synced 2026-02-26 17:54:14 +00:00
Reduce debounce delay in settings search (#2126)
This commit is contained in:
@@ -6,6 +6,7 @@
|
||||
v-model:modelValue="searchQuery"
|
||||
@search="handleSearch"
|
||||
:placeholder="$t('g.searchSettings') + '...'"
|
||||
:debounce-time="128"
|
||||
/>
|
||||
<Listbox
|
||||
v-model="activeCategory"
|
||||
@@ -14,7 +15,7 @@
|
||||
scrollHeight="100%"
|
||||
:optionDisabled="
|
||||
(option: SettingTreeNode) =>
|
||||
inSearch && !searchResultsCategories.has(option.label)
|
||||
!queryIsEmpty && !searchResultsCategories.has(option.label)
|
||||
"
|
||||
class="border-none w-full"
|
||||
/>
|
||||
@@ -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
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user