zillow / react-slider

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

upperBound in set incorrectly with React 16 #123

Closed mryarbles closed 6 years ago

mryarbles commented 6 years ago

We upgraded version of React to 16. Now the multi slider is broken.

The right slider has left: 0px.

When _handleResize is called initially the 'clientWidth' property of the slider must be 0, so the upperBound property is calculated incorrectly.

Right now my fix is to force a render in the component by updating a property in a timeout. Obviously that's not great. Haven't found a fix to apply to the component itself.

macnibblet commented 6 years ago

We are also suffering from this problem, does anyone have a better fix?

mpowaga commented 6 years ago

Version 0.10.0 now supports React 16 and fixes this issue.