Update search input with useAutocomplete (#11023)

This commit is contained in:
DS Boyce
2026-06-30 10:34:17 -07:00
committed by GitHub
parent 6607118729
commit 298c83bcba
9 changed files with 285 additions and 91 deletions
@@ -0,0 +1,23 @@
import {type SearchInput} from '#/components/forms/SearchInput'
import type * as bsky from '#/types/bsky'
type SearchInputProps = React.ComponentProps<typeof SearchInput>
export type SearchAutocompleteInputProps = SearchInputProps & {
/**
* When the search has fixed params (e.g. ProfileSearch), the web dropdown is
* suppressed.
*/
fixedParams?: boolean
/**
* Web only. Called when a profile result in the dropdown is selected.
*/
onSelectProfile?: (
profile: bsky.profile.AnyProfileView,
position: number,
) => void
/**
* Web only. Called when the "Search for X" row in the dropdown is selected.
*/
onSelectSearch?: (value: string) => void
}