githuboftigran / rn-range-slider

A native slider with range
MIT License
237 stars 133 forks source link

setLowValue(max) doesn't work #14

Closed bnlokash closed 5 years ago

bnlokash commented 5 years ago
<Slider
  ref={ component => this._sliderRef = component }
  rangeEnabled={false}
  min={1}
  max={5}
  step={1}
/>

this._sliderRef.setLowValue(5)

Calling setLowValue with the max value causes the slider to render at the 4th position, not the 5th. Calling setLowValue with 1, 2, 3, or 4 sets the slider position correctly. Tested on iOS simulator

githuboftigran commented 5 years ago

@bnlokash yes, because low value can't be equal to high value and high value can't be greater than max

bnlokash commented 5 years ago

I'm not sure I follow. In my usage there is only one slider, which I assume is the low. How would I set this to the max?

githuboftigran commented 5 years ago

Aaa, right... Will fix in near future, thanks for reporting.

githuboftigran commented 5 years ago

@bnlokash , fixed in 1.2.5