#Slider using state value inside onChange property returns initial state value

3 messages · Page 1 of 1 (latest)

eager temple
#

I created a sandbox for testing.
First move the first slider and see that slider 1 moves with slider 2. Then try to move slider 2 below a value of slider 1, which is supposed to not change because of the logic, but if you look at the reported value of the state of slider 1 says 0 instead of the value on the slider. You can try do that with both inputs and see that works as intended.

https://codesandbox.io/s/slider-onchange-test-60vpwe

If you have any more questions let me know.

golden comet
eager temple
#

Actually I just used normal inputs as slider and it works fine