githuboftigran / rn-range-slider

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

how to change step dynamicly #123

Closed webstermobile closed 1 year ago

webstermobile commented 2 years ago

0|-----------------50-----------------500------------------2500------------------|20000 the line is divided into four, but step is different, how to realize this feature ?

githuboftigran commented 1 year ago

@webstermobile , I guess you should do some math in renderValue and in onValueChange. like:

if (value < 5000) {
  value /= 100;
} else if (value < 10000) {
  value /= 20;
} else if (value < 15000) {
  value /= 6
}