Autocomplete
View on GitHub- No result
Property | Description | Default value |
---|---|---|
className from AutocompleteProps | string | undefined | - |
fetch from AutocompleteProps | (query: string) => Promise<autocomplete.Result[]> | - |
initialQuery from AutocompleteProps | string | undefined the initial query. Makes the component uncontrolled (incompatible with | '' |
onQueryChange from AutocompleteProps | ((query: string) => void) | undefined handler called on each query change, with the new query | () => {} |
onResultSelect from AutocompleteProps | ((result: autocomplete.Result) => void) | undefined handler called on each selection change, with the selected result | () => {} |
query from AutocompleteProps | string | undefined the current query. Makes the component controlled (incompatible with | '' |
renderResult from AutocompleteProps | React.ComponentClass<{ result: autocomplete.Result; }, any> | React.FunctionComponent<{ result: autocomplete.Result; }> | undefined Component to render results with. Won't be rendered if no results where fetched | ({ result }) => <>{result.label}</> |
renderResultExtra from AutocompleteProps | React.ComponentClass<{ close: () => void; }, any> | React.FunctionComponent<{ close: () => void; }> | undefined Extra component to display under results. Won't be rendered if no results where fetched | () => {} |
renderNoResult from AutocompleteProps | React.ComponentClass<{ close: () => void; }, any> | React.FunctionComponent<{ close: () => void; }> | undefined Component to render if no results where fetched. | () => {} |
height from AutocompleteProps | number | undefined | - |
value from SearchInputProps | string | undefined Value of the search input | - |
translations from SearchInputProps | { clear: string; } | undefined Translation object | - |