ptomasroos / react-native-multi-slider

Android and iOS Pure JS react native multi slider
MIT License
775 stars 401 forks source link

Right marker disappears when 0 #253

Open sandlands opened 2 years ago

sandlands commented 2 years ago

I'm using version 2.2.2. I have a MultiSlider with two markers and a range of (let's say) [-10, 10]. The left marker is set to anything below 0 (eg. -5) and the right marker is set to 0. When I start dragging the left marker, the right marker disappears. When I catch the value in the values setter, I can see that only one value (of the left marker) is in the array instead of two. (The left marker is still limited to the value of the right marker, it cannot exceed 0, which indicates that the right marker's value is still in effect.)

Steps to Reproduce

See this Expo Snack: https://snack.expo.dev/@buzzerbee/multislider-bug

Expected Behavior

Right marker does not disappear when dragging the left marker. There are two values provided to the values setter.

Actual Behavior

Right marker disappears when dragging the left marker (and the right markers value is 0). There is only one value in the values setter.