jesster2k10/react-native-range-slider

iOS - Prop "step" not working

Closed this issue · 2 comments

Thank you for the great library. This was indeed a missing library!
On iOS, prop "step" is not working.
Library TTRangeSlider needs prop enableStep to make it work but looks like it is missing in RNRangeSlider.m initWithEventDispatcher()
I've added _rangeSlider.enableStep = true; but now step is locked on value 10
I've also added _rangeSlider.step = _step; where float _step; is declared in @implementation but no luck still on 10.
Can you fix this? Thanks

Ok solved it, not sure if it is the right way but I'll try to make a PR.
In node_modules/@jesster2k10/react-native-range-slider/ios/RNRangeSlider.m:
in @implementation RNRangeSlider, add

float _step;

in initWithEventDispatcher:(), add

_rangeSlider.enableStep = true; 
_rangeSlider.step = _step;