SliderProps type' ValueType stuck as `number | number[]`
In our project, the ValueType needs to be number | undefined. The SliderProps type was updated to default its ValueType to number | number[]. It's using generics now so should be modifiable, but the Slider component itself is not setup to be passed a value for ValueType...
Create a new file called custom-slider.tsx then add:
import RcSlider, { SliderProps, SliderRef } from 'rc-slider/lib/Slider';
export const CustomSlider = RcSlider as React.ForwardRefExoticComponent<SliderProps<number | undefined> & React.RefAttributes<SliderRef>>;
then import CustomSlider to your file
Will there be a fix to this issue with a library update?
PR welcome
Any updates?