react-component / slider

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

Error when dragging #935

Closed hdao3363 closed 1 year ago

hdao3363 commented 1 year ago
image

I got the error above just by dragging. The error only shows up if I setValue. This is how I init the component

            <Slider
                range
                allowCross={false}
                defaultValue={[filterOptions.price[0], filterOptions.price[1]]}
                onChange={(value) => {
                    if (value != null) {
                        // const test = value[0] 
                        // console.log(test) <--- will log the right information 
                        setValue(test) <--- cause the error above
                    }
                }}
                style={{ marginLeft: "6px" }}
            />
alexandermirzoyan commented 9 months ago

I have same problem