I am trying to wrap a MuiAutocomplete around my own custom component and also pass in AutocompleteProps as a prop, while using typescript. Here's what I have:
type Props = {
autoCompleteProps?: AutocompleteProps<T>
label: string
loading?: boolean
}
const AutoComplete: React.FC<Props> = ({
autoCompleteProps,
label,
loading,
}) => {
return (
<MuiAutocomplete {...autoCompleteProps}/>
)
}
But I get the following error on: autoCompleteProps?: AutocompleteProps<T>
Generic type 'AutocompleteProps<T, Multiple, DisableClearable, FreeSolo, ChipComponent>' requires between 4 and 5 type arguments
What am I doing wrong and how can I fix it?
And I also want to make renderInput optional