I’ve tested mainly with range sliders.
I just can’t seem to get it to work
The onChange event:
(event) => {
Slider.setValue(event.target.value)
}
Will never update the sliders value.
and since you cannot change the header to look something like
(event, value) => {
Slider.setValue(value)
}
or
(event, value) => {
Slider.setValue(value as number)
}
I can’t seem to find a way to make it work (even with functions as I can’t seem to find how to feed the data from onChange into it.)
Perhaps It has something to do with needing an array?
This is a copy pasta of the value field of slider from the documentation:
value number Defines the value of the slider. A ranged slider requires an array of two values.
But i’ve also tried every which way of
- Creating the default values in an array instead of just a number to initialise it
- Calling with an array specifier at the end like so: Slider.value[1] (1, in theory to get the max value, 0 being the min)
- Setting the Value onChange as if it where an array.
Has anyone found a way to do it? Is the functionality not fully implemented i.e. beta is beta?
Perhaps I’m missing something obvious.