Hello, I'm having a weird issue, when setting steps to the slider, it keeps staying to the place it's been at originally.
After a few investigations into the library code, I found that the issue is due to this part of the code
For a reason I did not crack yet if you comment the whole "if snappingEnabled" statment, it works as intended.
I logged currentWidth, and especially currentIndex but they are always the same, that's where there is the actual problem.
Do you have any idea ?
Here is my code for you to reproduce something similar
Hey, @riamon-v thanks for looking into this. You are right, this code is unnecessary. It was there because I hadn't cleared it up last time. So I just removed it and released a new version here. You can try it again now!
Hey, @riamon-v thanks for looking into this. You are right, this code is unnecessary. It was there because I hadn't cleared it up last time. So I just removed it and released a new version here. You can try it again now!
Hello, I'm having a weird issue, when setting steps to the slider, it keeps staying to the place it's been at originally.
After a few investigations into the library code, I found that the issue is due to this part of the code
For a reason I did not crack yet if you comment the whole "if snappingEnabled" statment, it works as intended. I logged
currentWidth
, and especiallycurrentIndex
but they are always the same, that's where there is the actual problem.Do you have any idea ?
Here is my code for you to reproduce something similar
SliderInput:
Here is the behavior observed
https://github.com/alantoa/react-native-awesome-slider/assets/19188004/dd90c2a9-b81b-4455-9504-d3870ddf49fd