githuboftigran / rn-range-slider

A native slider with range
MIT License
234 stars 130 forks source link

default values #79

Closed Motazlubbad closed 3 years ago

Motazlubbad commented 3 years ago

Hello,

I'm trying to default values to the slider, for example my min 10 max 100 I want the selection to start from 40 not from 10. any help?

githuboftigran commented 3 years ago

lowValue prop is what you need, please read the documentation.

gurbela commented 1 year ago

There is no information about lowValue in the documentation, also the component does not receive this value either

gurbela commented 1 year ago

The name of this prop is low

anatooly commented 11 months ago

this not defaultValue (like TextInput) that work without state. If we set low like this low={3} slider not work.

 const [low, setLow] = useState(3)

<RangeSlider
  low={low}
  onValueChanged={(low, high) => {
    setLow(low)
  }}
/>