mirror of
https://github.com/Comfy-Org/ComfyUI_frontend.git
synced 2026-04-29 18:52:19 +00:00
[backport cloud/1.37] Templates: Search speed (#8397)
Backport of #8286 to `cloud/1.37` Automatically created by backport workflow. ┆Issue is synchronized with this [Notion page](https://www.notion.so/PR-8397-backport-cloud-1-37-Templates-Search-speed-2f76d73d3650810c96fdd00691f9b2f7) by [Unito](https://www.unito.io) Co-authored-by: Alexander Brown <drjkl@comfy.org>
This commit is contained in:
@@ -1,4 +1,4 @@
|
|||||||
import { refDebounced, watchDebounced } from '@vueuse/core'
|
import { refThrottled, watchDebounced } from '@vueuse/core'
|
||||||
import Fuse from 'fuse.js'
|
import Fuse from 'fuse.js'
|
||||||
import type { IFuseOptions } from 'fuse.js'
|
import type { IFuseOptions } from 'fuse.js'
|
||||||
import { computed, ref, watch } from 'vue'
|
import { computed, ref, watch } from 'vue'
|
||||||
@@ -84,7 +84,7 @@ export function useTemplateFiltering(
|
|||||||
return ['ComfyUI', 'External or Remote API']
|
return ['ComfyUI', 'External or Remote API']
|
||||||
})
|
})
|
||||||
|
|
||||||
const debouncedSearchQuery = refDebounced(searchQuery, 50)
|
const debouncedSearchQuery = refThrottled(searchQuery, 50)
|
||||||
|
|
||||||
const filteredBySearch = computed(() => {
|
const filteredBySearch = computed(() => {
|
||||||
if (!debouncedSearchQuery.value.trim()) {
|
if (!debouncedSearchQuery.value.trim()) {
|
||||||
|
|||||||
Reference in New Issue
Block a user