Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to turn this slider into a single value slider? #263

Open
2 tasks done
TamasFarago opened this issue Apr 14, 2022 · 3 comments
Open
2 tasks done

How to turn this slider into a single value slider? #263

TamasFarago opened this issue Apr 14, 2022 · 3 comments

Comments

@TamasFarago
Copy link

TamasFarago commented Apr 14, 2022

Steps to Reproduce

Expected Behavior

Actual Behavior

@AlixH
Copy link

AlixH commented Sep 14, 2022

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

cf. examples folder

@pedrospecter
Copy link

pedrospecter commented Mar 28, 2024

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…

@ricardo-alan
Copy link

  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}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants