react-input-range icon indicating copy to clipboard operation
react-input-range copied to clipboard

Allow min and max to have same values

Open devel-pa opened this issue 7 years ago • 3 comments

#55

devel-pa avatar Jun 19 '17 20:06 devel-pa

Will also fix #85

MatthieuLemoine avatar Jun 21 '17 13:06 MatthieuLemoine

Testing it out, I'm having trouble "unsetting" the case where the two sliders are both set to the max range.

Repro:

  1. Setup default config w/ range 0-10 and values {min: 0, max: 10}
  2. Drag and set min to the max value (10)
  3. Try sliding the slider back from the max val result Slider doesn't move Expected min slider can be moved back

This appears to be caused by the "max" slider catching the click event, and not letting it pass through to the min slider. I think that the following simple logic should fix this:

If `valMax === rangeMax && valMax === valMin` : pass event to minSlider

pdfowler avatar Jun 30 '17 20:06 pdfowler

Does this need to be picked up again? I'd be happy to build from this PR. We are looking for the same functionality.

jhblacklock avatar Dec 29 '17 20:12 jhblacklock