mirror of
https://github.com/Comfy-Org/ComfyUI_frontend.git
synced 2026-01-26 19:09:52 +00:00
Templates: Search speed (#8286)
## Summary ... ┆Issue is synchronized with this [Notion page](https://www.notion.so/PR-8286-Templates-Search-speed-2f26d73d365081dab3d1cccd7878a1de) by [Unito](https://www.unito.io)
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