You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Then you'd define options like this when you're using objects as options (it type errors if you don't include label and informs about the missing properties) options={{ objects: options, label: optionLabel }}, and yet no complaints from TypeScript if you define options as string array: options={['Option1', 'Option2']}.
Defining options in Autocomplete:
options: Options<T[]>
Example, using
string[]
andMyOptionType
as object type:Then you'd define options like this when you're using objects as options (it type errors if you don't include label and informs about the missing properties)
options={{ objects: options, label: optionLabel }}
, and yet no complaints from TypeScript if you define options as string array:options={['Option1', 'Option2']}
.Originally posted by @olavis in #2976 (comment)
The text was updated successfully, but these errors were encountered: