76
Views
1
Comments
Pass array value to range slider
Question

Hi All,

We used range slider in our mobile app for showing tenure and whose range is below 

3, 6, 9, 12, 18, 24, 30, 36

And these value we getting from api.

So, how can I pass this json response to range slider ?

Please help me for the same.

Thank you !


Rank: #406

Swapnil Shinde wrote:

Hi All,

We used range slider in our mobile app for showing tenure and whose range is below 

3, 6, 9, 12, 18, 24, 30, 36

And these value we getting from api.

So, how can I pass this json response to range slider ?

Please help me for the same.

Thank you !



Since they are not intervals evenly defined you could create a mapping and aplly that mapped to the slider. 

Example: set the min of the slider to 1 and max to 8 cause thats the number of elements returned by the api. 

Then if the slider is between position 2 and 4 for example you know that you have to call the api with min 6 and max 12.

I haven't tried this but I think it is an option.