react-native-multi-slider icon indicating copy to clipboard operation
react-native-multi-slider copied to clipboard

Issue with marker position in edges of in range slider

Open apedroferreira opened this issue 4 years ago • 7 comments

Hey, first of all thank you for creating this library, it works great and is so customizable, it helped me a lot!

The only issue I had is that when you drag a marker to the extremes of the range slider, it actually goes a bit beyond the edges of the bar(especially in iOS).

In either iOS and Android this does not match the default native slider behavior. I think it would be much better if the markers stopped in the edges by being aligned with the edges of the bar, like the native sliders do, since that alignment makes things look a lot better from a design perspective.

Would it be possible to fix this or support this behavior with an additional option or something?

Thanks!

apedroferreira avatar Aug 10 '20 20:08 apedroferreira

Hello 👋, I have the same problem here, the thumb goes beyond the boundaries of the slider. Is there a configuration to follow or is it an unwanted behavior?

Thanks!

iddahadev avatar Sep 22 '20 14:09 iddahadev

Just add width to containerStyle <MultiSlider min={0} max={5200} sliderLength={300} values={[1000, 4000]} enabledTwo={true} trackStyle={{backgroundColor: 'red'}} containerStyle={{width: 500}} ..... }} />

shareef-dweikat avatar Feb 02 '21 18:02 shareef-dweikat

We've been seeing this, and on Android the marker isn't responding to touches on the outer half when on the edges (e.g., the sections where the track doesn't exist). Setting width in containerStyle doesn't seem to change anything. We're on React Native 0.61.5, if that makes a difference.

lindboe avatar Mar 23 '21 23:03 lindboe

We've been seeing this, and on Android the marker isn't responding to touches on the outer half when on the edges (e.g., the sections where the track doesn't exist). Setting width in containerStyle doesn't seem to change anything. We're on React Native 0.61.5, if that makes a difference.

Did you solve this issue?

TomasSestak avatar Mar 26 '21 16:03 TomasSestak

I'm having this same issue... I pushed the marker in with markerSize prop and that kind of works around it

formaldehydeson avatar May 13 '21 05:05 formaldehydeson

I have solved with below code customLabel={(e) => { let val1 = e.oneMarkerValue; let val2 = e.twoMarkerValue; return <View style{{flex: 1, flexDirection: "row"}}> <Text>{val1}</Text> <View style{{flex: 1}}/> <Text>{val2}</Text> </View> }}

example

Swatee16 avatar Jun 28 '21 09:06 Swatee16

I have solved with below code customLabel={(e) => { let val1 = e.oneMarkerValue; let val2 = e.twoMarkerValue; return <View style{{flex: 1, flexDirection: "row"}}> <Text>{val1}</Text> <View style{{flex: 1}}/> <Text>{val2}</Text> </View> }}

Did you paste the wrong part of the code? I don't understand how changing customLabel would fix anything

ojhansson avatar Sep 27 '21 13:09 ojhansson