File tree Expand file tree Collapse file tree
punks.auction/app/composables Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -15,6 +15,7 @@ export function useActivitySearchScope() {
1515 syncRoute : true ,
1616 enableListedFilter : false ,
1717 enableEnterNavigation : false ,
18+ debounceMs : 300 ,
1819 } )
1920
2021 const hasSearchInput = computed ( ( ) => searchText . value . trim ( ) . length > 0 )
Original file line number Diff line number Diff line change @@ -17,6 +17,7 @@ type PunkSearchOptions = {
1717 enableOwnerSearch ?: boolean
1818 enableEnterNavigation ?: boolean
1919 initialText ?: string
20+ debounceMs ?: number
2021}
2122
2223const LISTED_QUALIFIER =
@@ -49,6 +50,7 @@ export function usePunkSearch(options: PunkSearchOptions = {}) {
4950 const enableMarketQualifiers = options . enableMarketQualifiers ?? true
5051 const enableOwnerSearch = options . enableOwnerSearch ?? true
5152 const enableEnterNavigation = options . enableEnterNavigation ?? true
53+ const debounceMs = options . debounceMs ?? 80
5254
5355 const baseQuery = computed ( ( ) => toValue ( options . baseQuery ) )
5456 const text = ref (
@@ -57,7 +59,7 @@ export function usePunkSearch(options: PunkSearchOptions = {}) {
5759 )
5860 const toggleListed = ref ( enableListedFilter && route ?. query . sale === '1' )
5961
60- const debouncedText = refDebounced ( text , 80 )
62+ const debouncedText = refDebounced ( text , debounceMs )
6163 const qualifiers = computed ( ( ) =>
6264 extractQualifiers ( debouncedText . value , {
6365 enableMarketQualifiers,
You can’t perform that action at this time.
0 commit comments