react-native-multi-slider icon indicating copy to clipboard operation
react-native-multi-slider copied to clipboard

How to turn this slider into a single value slider?

Open TamasFarago opened this issue 2 years ago • 3 comments

Steps to Reproduce

Expected Behavior

Actual Behavior

TamasFarago avatar Apr 14 '22 10:04 TamasFarago

Pass only one value to the values array e.g. two values slider: values = {[3,5]} one value slider: values = {[5]}

cf. examples folder

AlixH avatar Sep 14 '22 14:09 AlixH

Is it just only me or there is a bug in this?

when I try to do this:

<MultiSlider
                          values={[1,10]}
                          sliderLength={slidersWidth}
                          onValuesChange={(value) => { setData((ps => ({ ...ps, value: [...value] }))) }}
                          min={1}
                          max={10}
                          step={1}
                          value={data?.value || info.default}
                          allowOverlap={false}
                          snapped
                          markerStyle={{ height: 30, width: 30, borderRadius: 20 }}
                          trackStyle={{ height: 4, borderRadius: 5 }}
                          selectedStyle={{ backgroundColor: '#242424' }}
                          unselectedStyle={{ backgroundColor: 'silver' }}
                          touchDimensions={{ height: 40, width: 40, borderRadius: 20, slipDisplacement: 40 }}
                      />
                      
                    Am never able to select the 10. I guess because somewhat the other marker is still there…

pedrospecter avatar Mar 28 '24 13:03 pedrospecter

  Am never able to select the 10. I guess because somewhat the other marker is still there…

I had the same problem! but I solved it with: allowOverlap={true}

ricardo-alan avatar Apr 05 '24 05:04 ricardo-alan