angularjs-slider
angularjs-slider copied to clipboard
fix slider jumps to first value if value is not in stepsArray
As I used the slider with a stepsArray and an input to change the value, I found that if a value is entered in the input that's not in the stepsArray the slider jumps to its minimum value.
I changed it so that it jumps to the next higher value instead.
Codecov Report
Merging #626 into master will not change coverage. The diff coverage is
100%.
@@ Coverage Diff @@
## master #626 +/- ##
=====================================
Coverage 100% 100%
=====================================
Files 1 1
Lines 950 951 +1
=====================================
+ Hits 950 951 +1
| Impacted Files | Coverage Δ | |
|---|---|---|
| src/rzslider.js | 100% <100%> (ø) |
:arrow_up: |
Continue to review full report at Codecov.
Legend - Click here to learn more
Δ = absolute <relative> (impact),ø = not affected,? = missing dataPowered by Codecov. Last update 93ada11...13a85ba. Read the comment docs.
I also run into this issue when the ceil is not in the step interval the ceil could be overshot.
I think we just need to respect enforceStep: false option when using stepsArray. This is old bug #410.