Slider: Controlled Range with allowCross=false has issues

Created on 25 Oct 2017  ·  2Comments  ·  Source: react-component/slider

Here is a demo: https://codepen.io/anon/pen/LzwzEW

Specifically, with 3 ranges or more, when cursor i is moved, cursors from i+2 and beyond are set to the value of i+1. Cursors from i-2 and before are set to i-1 value.

bug

Most helpful comment

@paranoidjk agree.
I think I had fixed at #304 , I add index to ensureValueNotConflict, please check.

All 2 comments

@benjycui

Seems ensureValueNotConflict logic is wrong when there is over 3 handle.

Right now it haven't consider about the beeing processed value index in the whole bounds array, which cause all satisfy index > curHandle && value > curValue condition's handle got set to current handle value.

And it may need to handle pushable situation at the same time.

@paranoidjk agree.
I think I had fixed at #304 , I add index to ensureValueNotConflict, please check.

Was this page helpful?
0 / 5 - 0 ratings