zillow / react-slider

Accessible, CSS agnostic, slider component for React.
https://zillow.github.io/react-slider
MIT License
883 stars 231 forks source link

Dynamic thumb style not reflected in slider update #188

Closed Pedrozena closed 4 years ago

Pedrozena commented 4 years ago

Description

I need to use the slider component by dynamically change the size of the thumb. Whenever a change of this kind happen, between two given lifecycles, the main slider component is not able to correctly restrict the movement of the thumb within its bounds

CodeSandbox

https://codesandbox.io/s/optimistic-worker-ix143?file=/src/App.js

Edit zillow/react-slider

Pedrozena commented 4 years ago

I solved by requiring a resize, by using the ref element, as showed here