slider
slider copied to clipboard
Fix keyboard control for null step with marks
Currently, util.calculateNextValue()
incorrectly returns mark object instead of value when steps are disabled (by passing null
to step
prop) and marks are used
The consequence of this is keyboard navigation will crash the slider due to unhandled errors that stem from unexpected value type.
Steps to reproduce
- Pass a marks object as prop to slider component
- Pass
step = {null}
as prop to slider component - Manipulate slider position using arrow keys
Codecov Report
Merging #607 into master will not change coverage. The diff coverage is
100%
.
@@ Coverage Diff @@
## master #607 +/- ##
======================================
Coverage 95.4% 95.4%
======================================
Files 2 2
Lines 87 87
Branches 29 29
======================================
Hits 83 83
Misses 4 4
Impacted Files | Coverage Δ | |
---|---|---|
src/utils.js | 95% <100%> (ø) |
:arrow_up: |
Continue to review full report at Codecov.
Legend - Click here to learn more
Δ = absolute <relative> (impact)
,ø = not affected
,? = missing data
Powered by Codecov. Last update 34fca54...4665779. Read the comment docs.
Rebase please.