birdofpreyru / react-utils

ReactJS development kit.
https://dr.pogodin.studio/docs/react-utils/index.html
Other
3 stars 0 forks source link

`<CustomDropdown>` and `<Switch>` have problematic typing (`ValueT` is `number` | `string`) #342

Open birdofpreyru opened 2 months ago

birdofpreyru commented 2 months ago

This typing disallows to assign onChange with a setter accepting only, say, a string when the value is just string in provided options.

https://github.com/birdofpreyru/react-utils/blob/d83994a5ee0e130fc85ee32d891ec8d19a295da3/src/shared/components/selectors/CustomDropdown/index.tsx#L20