airbnb / rheostat

Rheostat is a www, mobile, and accessible slider component built with React
MIT License
1.69k stars 189 forks source link

Fix Rheostat Snap Points (6/7) #168

Closed philipfweiss closed 6 years ago

philipfweiss commented 6 years ago

Recently, Rheostat received an update which merged it with an internal Airbnb version. This internal version deprecated snap points, which were re-implemented in (https://github.com/airbnb/rheostat/pull/161).

A bug with that re-implementation caused the snap points to snap correctly, but there was no fluid animation before the snap. Instead, the slider would not move until a snap point was hit, at which point it would jump.

This change fixes this bug and brings snap points back to desired functionality.