Skip to content

Markers don't move in one direction when overlappingΒ #280

@nicholasc120

Description

@nicholasc120

I'm using the MultiSlider with two markers. when they overlap each other on the left side, I'm unable to move the marker down until i move the other marker back up. Likewise, when both markers overlap on the right side, I cannot move one marker up until i move the other marker down.

For example, I'm using a slider with min and max values of 1 and 4. If I move both markers to 2, I can't move the lower marker to 1 until I move the upper marker to 3. Likewise, if I move both markers to 3, I can't move the upper marker to 4 until I move the lower marker to 2.

Steps to Reproduce

<MultiSlider
            values={[multiSliderValue[0], multiSliderValue[1]]}
            sliderLength={280}
            onValuesChange={
                (newValues) => {
                    setMultiSliderValue(newValues)
                 }
            }
            min={1}
            max={4}
            allowOverlap={true}
            smoothSnapped
/>

Move both markers to 2 and then try and move one of them to 1, or move both markers to 3 and then try to move one of them to 4

Expected Behavior

I thought if it overlapped on the left and I dragged the marker down, the left marker would move down, and if it overlapped on the right and I dragged the marker right, the right marker would move up.

Actual Behavior

Trying to move the marker in the direction of the overlap doesn't do anything.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions