Skip to content

Commit

Permalink
Avoid type error in MuiAutocomplete
Browse files Browse the repository at this point in the history
Typescript's type resolution fails to determine that we use MuiAutocomplete not in
freeSolo mode when updating to a later Material UI version.

We therefore explicitly disable freeSolo mode to avoid the wrong type error.

Co-authored-by: Stefan Dirix <sdirix@eclipsesource.com>
  • Loading branch information
wienczny and sdirix authored Jun 23, 2022
1 parent ddd4315 commit afff4da
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions packages/material/src/mui-controls/MuiAutocomplete.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,7 @@ export const MuiAutocomplete = (props: EnumCellProps & WithClassname & WithOptio
fullWidth
options={options}
getOptionLabel={getOptionLabel || (option => option?.label)}
freeSolo={false}
style={{ marginTop: 16 }}
renderInput={params => (
<Input
Expand Down

0 comments on commit afff4da

Please sign in to comment.