alantoa / react-native-awesome-slider

🚀 An anwesome <Slider/> that supports various features haptic, lottie, animation, ballon, etc.
MIT License
228 stars 28 forks source link

Add step prop #4

Closed jared-94 closed 2 years ago

jared-94 commented 2 years ago

Thanks for your great package!

As many other sliders it would be nice to have a step prop (for a discrete slider)

alantoa commented 2 years ago

Ok, I will add this feature later.You can follow this lib.

jared-94 commented 2 years ago

Thanks 👍

alantoa commented 2 years ago

@jared-94 Hi, I have added step feature, See example, you just use code:

<Slider
    progress={progress}
    minimumValue={min}
    maximumValue={max}
    step={10}
/>

Regrettably, I was busy, just simply did a test, I hope you can help me test it out. If you have any questions, welcome to call me. Finally, if you think it's good, please give me a Star, Thank you!

jared-94 commented 2 years ago

Thanks It works fine !

However, it seems that onSlidingComplete doesn't return the correct value... Any idea?

alantoa commented 2 years ago

@jared-94 This is a bug, I will deal with it asap

alantoa commented 2 years ago

@jared-94 Hi, I fixed it! You can try it!