UNPKG

@selfcommunity/react-ui

Version:

React UI Components to integrate a Community created with SelfCommunity Platform.

23 lines (22 loc) 940 B
import { AutocompleteProps } from '@mui/material'; import { SCSuggestionType } from '@selfcommunity/types'; export interface SearchAutocompleteProps extends Pick<AutocompleteProps<string, false, false, true>, Exclude<keyof AutocompleteProps<string, false, false, true>, 'inputValue' | 'freeSolo' | 'multiple' | 'autoComplete' | 'loading' | 'loadingText' | 'noOptionsText' | 'options' | 'getOptionLabel' | 'onInputChange' | 'renderOption' | 'renderInput'>> { /** * The search form shoul focus on mount * @default false */ autoFocus?: boolean; /** * Handler for search action */ onSearch?: (value: string) => void; /** * Handler for clear action */ onClear?: () => void; /** * Handler for item select action */ onSuggestionSelect?: (suggestion: SCSuggestionType) => void; } export default function SearchAutocomplete(inProps: SearchAutocompleteProps): JSX.Element;