angularjs-slider icon indicating copy to clipboard operation
angularjs-slider copied to clipboard

fix slider jumps to first value if value is not in stepsArray

Open DominikFG opened this issue 7 years ago • 3 comments

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.

DominikFG avatar May 11 '18 08:05 DominikFG

Codecov Report

Merging #626 into master will not change coverage. The diff coverage is 100%.

Impacted file tree graph

@@          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 data Powered by Codecov. Last update 93ada11...13a85ba. Read the comment docs.

codecov-io avatar May 11 '18 08:05 codecov-io

I also run into this issue when the ceil is not in the step interval the ceil could be overshot.

evestraw avatar Sep 06 '18 15:09 evestraw

I think we just need to respect enforceStep: false option when using stepsArray. This is old bug #410.

ViieeS avatar Jan 22 '19 13:01 ViieeS