This commit is contained in:
Andras Schmelczer 2026-05-26 19:45:13 +01:00
parent c645b0f1d4
commit 39ef5c6646
79 changed files with 5660 additions and 2199 deletions

View file

@ -13,9 +13,9 @@ interface SearchHook {
activeIndex: number;
setActiveIndex: (idx: number) => void;
open: boolean;
setOpen: (open: boolean) => void;
handleInputChange: (value: string) => void;
handleKeyDown: (e: React.KeyboardEvent, onSelect: (result: SearchResult) => void) => void;
showEmptySearches: () => void;
}
interface PlaceSearchInputProps {
@ -129,7 +129,7 @@ export function PlaceSearchInput({
onInputChange?.();
}}
onFocus={() => {
if (search.results.length > 0) search.setOpen(true);
search.showEmptySearches();
}}
onKeyDown={(e) => search.handleKeyDown(e, onSelect)}
placeholder={placeholder}