UNPKG

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