ptomasroos / react-native-multi-slider

Android and iOS Pure JS react native multi slider
MIT License
775 stars 401 forks source link

Min Max Slider Marker Issue #245

Closed VinitBhavsar closed 3 years ago

VinitBhavsar commented 3 years ago

Steps to Reproduce

<MultiSlider enabledOne={true} enabledTwo={true} isMarkersSeparated={true} onValuesChange={(value) => { let val = value.toString().split(",") this.setState({ minAge: val[0], maxAge: val[1] }) }} max={60} min={18} sliderLength={SCREEM_WIDTH - 90} values={[minAge, maxAge]} onToggleOne={() => { }} onToggleTwo={() => { }} allowOverlap={false} minMarkerOverlapDistance={10} minMarkerOverlapStepDistance={10} />

Expected Behavior

Screenshot_1629716850

Actual Behavior

Screenshot_1629716615

faizansohail077 commented 3 years ago

Did you find the answer to this ? facing same issue.

VinitBhavsar commented 3 years ago

Nope @faizansohail077

VinitBhavsar commented 3 years ago

@faizansohail077 Try min-max value in single state. minMax: [23,28] Slider Props: <MultiSlider enabledOne={true} enabledTwo={true} isMarkersSeparated={true} onValuesChange={(value) => { this.setState({ minMax: value }) }} max={60} min={18} values={this.state.minMax} allowOverlap={false} />

Anant5555 commented 3 years ago

@faizansohail077 Try min-max value in single state. minMax: [23,28] Slider Props: <MultiSlider enabledOne={true} enabledTwo={true} isMarkersSeparated={true} onValuesChange={(value) => { this.setState({ minMax: value }) }} max={60} min={18} values={this.state.minMax} allowOverlap={false} />

Hi Vinit, this one didnt fix it... Were you able the issue? I am facing the same

VinitBhavsar commented 3 years ago

@Anant5555 can you share your code?