import { ChangeEvent, ReactNode } from 'react'; import { AutocompleteProps as MuiAutocompleteProps } from '@material-ui/lab/Autocomplete'; type AutocompleteProps = { options: (object | string)[]; /** * Renders input */ renderInput: (params: any) => ReactNode; value?: object | string; size?: MuiAutocompleteProps['size']; /** * Works only with strings as `options`. If `true`, `onChange` has the following signature:
* ``` * (value: string, wasCreated: boolean) => void; * ``` */ isCreatable?: boolean; /** * Used for searching the options list by default */ getOptionLabel: (option: object | string) => string; /** * Required when working with objects as `options`. */ renderOption?: (option: object | string, params: { selected: boolean; inputValue: string; }) => string; onInputChange?: (event: ChangeEvent<{}>, value: string, action: 'input' | 'reset' | 'clear') => void; onChange?: (event: ChangeEvent<{}>, value: object | string, reason: 'create-option' | 'select-option' | 'remove-option' | 'clear' | 'blur') => void; classes?: Record; className?: string; loading?: boolean; loadingText?: ReactNode; getOptionDisabled?: (option: object | string) => boolean; /** * If `true` - prevents Autocomplete from closing on select */ disableCloseOnSelect?: boolean; multiple?: boolean; } & Omit, 'options' | 'renderInput' | 'value' | 'size' | 'isCreatable' | 'getOptionLabel' | 'renderOption' | 'onInputChange' | 'onChange' | 'classes' | 'className' | 'loading' | 'loadingText' | 'getOptionDisabled' | 'disableCloseOnSelect' | 'multiple'>; declare const Autocomplete: ({ isCreatable, options: inputOptions, value: inputValue, getOptionLabel, onInputChange, onChange, renderOption, classes: customClasses, ...restProps }: AutocompleteProps) => JSX.Element; export default Autocomplete; //# sourceMappingURL=Autocomplete.d.ts.map