When looking at the SelectOption.value and Select.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 takes string | number. I had expected it to also use any.
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.
When looking at the
SelectOption.valueandSelect.selectedproperties, 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.onSelectproperty 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.