(item?: string)
| 105 | }, [searchResults, isPending, suggestionType, purify]); |
| 106 | |
| 107 | const submitQuery = async (item?: string) => { |
| 108 | const itemQuery = item?.replace?.(sanitizeSearchTitleMatch, ''); |
| 109 | await onSubmitQuery(itemQuery || typedQuery.current || '', { |
| 110 | filters: { |
| 111 | time: time.toString(), |
| 112 | contentCuration: contentCurationFilter, |
| 113 | }, |
| 114 | }); |
| 115 | if (itemQuery) { |
| 116 | initialQuery.current = itemQuery; |
| 117 | typedQuery.current = itemQuery; |
| 118 | } |
| 119 | |
| 120 | setIsFocused(false); |
| 121 | }; |
| 122 | |
| 123 | const { selectedItemIndex, onKeyDown } = useAutoComplete(items, submitQuery); |
| 124 | const [debounceQuery] = useDebounceFn<string>( |
no test coverage detected