UNPKG

944 BTypeScriptView Raw
1import type { SearchBoxProps as SearchBoxUiComponentProps } from '../ui/SearchBox';
2import type { UseSearchBoxProps } from 'react-instantsearch-core';
3type UiProps = Pick<SearchBoxUiComponentProps, 'inputRef' | 'isSearchStalled' | 'onChange' | 'onReset' | 'onSubmit' | 'value' | 'autoFocus' | 'translations'>;
4export type SearchBoxProps = Omit<SearchBoxUiComponentProps, Exclude<keyof UiProps, 'onSubmit' | 'autoFocus'>> & UseSearchBoxProps & {
5 /**
6 * Whether to trigger the search only on submit.
7 * @default true
8 */
9 searchAsYouType?: boolean;
10 /**
11 * Whether to update the search state in the middle of a
12 * composition session.
13 * @default false
14 */
15 ignoreCompositionEvents?: boolean;
16 translations?: Partial<UiProps['translations']>;
17};
18export declare function SearchBox({ queryHook, searchAsYouType, ignoreCompositionEvents, translations, ...props }: SearchBoxProps): JSX.Element;
19export {};