palantir/blueprint
在 GitHub 查看Slider Handle goes out of bounds when provided values lower/higher than min/max
Open
#4,285 建立於 2020年8月18日
P3Package: coreType: bughelp wanted
描述
Environment
- Package version(s): 3.25.0
- Operating System: Ubuntu 18.04
- Browser name and version: Chrome 84
Code Sandbox
Steps to reproduce
- Create a slider (also works for multislider)
- Provide min/max props
- Set the value to be greater than max value
Actual behavior
The handle goes out of bounds and floats to the side
Expected behavior
Should filter the value under the hood
Possible solution
.filter(value => value > min] && value < max) under the hood
This specifically came up because I'm trying to sync a slider with a d3 graph which zooms. I think everything works pretty nicely except for this out of bounds issue. I understand that this wouldn't happen under normal use of the slider where you would only be able to set the value prop of the slider by dragging and setting on the slider, but I also don't think this would be difficult/performance heavy.