react-component / slider

React Slider
https://slider.react-component.now.sh/
MIT License
3.02k stars 761 forks source link

Slider can only move by one step #968

Open mgoldenbe opened 5 months ago

mgoldenbe commented 5 months ago

I am using Slider like this:

<Slider 
    range
    className="t-slider"
    min={0}
    max={120}
    step={15}
    marks={Object.fromEntries(range(0, 121, 15).map(t=>[t, formatTimestamp(t, 60)]))}
    value={paragraphLength}
    onChange={(v) => {setParagraphLength(v);}}/>

When dragging the slider, it gets released after a single step, so the user needs to grab it again to drag another step. A similar observation was reported in #363. However, in contrast to the code there, I do not create a Range during render (I do not create it at all).