[Slider] value
type should narrow onValueChange
value type
#1230
Labels
component: slider
This is the name of the generic UI component, not the React module!
enhancement
This is not a bug, nor a new feature
Feature request
Summary
The
Slider
accepts values of typeArray<number> | number
but theonValueChange
andonValueCommitted
callbacks don't narrow the type of thevalue
parameter tonumber
orArray<number>
and users need to type cast it manually.Example of code throwing a TS error:
Example of type casting needed to overcome the TS error:
Motivation
Avoid users needing to do manual type casting.
The text was updated successfully, but these errors were encountered: