[material-ui][Select] Typescript errors with generic argument for multiple select #41375
Labels
component: select
This is the name of the generic UI component, not the React module!
package: material-ui
Specific to @mui/material
ready to take
Help wanted. Guidance available. There is a high chance the change will be accepted
regression
A bug, but worse
typescript
Steps to reproduce
Typescript reproduction example: Link
Using the generic argument in the Select component with
multiple
property causes an error by passing the generic argument tovalue
and toonChange
propertiesCurrent behavior
Typescript error when using generic component and passing value with generic type to
value
andonChange
function.Expected behavior
No Typescript errors
Context
I tested the 5.15.10 version. It was good, without error. Looking at the source code of the newer version I see that passing
Variant
as a second type argument to theSelectProps
type causes that error. Maybe it's a Typescript issue here, but I can't understand why.Your environment
npx @mui/envinfo
5.15.10 -> 5.15.12
Search keywords: Select, generic, types, typescript
The text was updated successfully, but these errors were encountered: