Why is a generic needed for the selectionMode in the Select component? #9436
-
|
Hey, what's the reason behind we needing to pass a generic for the Currently, function Select<
T extends object,
M extends "multiple" | "single" = "single"
>({...props}: SelectProps<T, M>)But for example, So we don't need to pass a generic. function ListBox<T extends object>({
...props
}: ListBoxProps<T>) {But for some reason for the |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
|
The type of the |
Beta Was this translation helpful? Give feedback.
The type of the
valueprop changes to an array when multiple selection is enabled.