SelectOption.value and Select.selected has "any" type, but Select.onSelect has "(..., string | number)" #11361
Labels
Breaking change 💥
this change requires a major release and has API changes.
When looking at the
SelectOption.value
andSelect.selected
properties, I got the impression that one can use any JavaScript value to identify select options, and it indeed works as expected.But it doesn't type-check: The
Select.onSelect
property wants a function that takesstring | number
. I had expected it to also useany
.We have our own variant of your SimpleSelect template, and we would like to make it generic in the type of the option value. This seems to work, except for this little niggle about the type of
Select.onSelect
.The text was updated successfully, but these errors were encountered: