Closed SylvainBailly closed 2 years ago
Forgot to say that if i console.log(value) just before set every seems ok but when i console.log elem.noUiSlider?.get(); right after .set() i got the shift.
I really hope you can help me :)
Why are you passing true
, true
as additional arguments to set
here?
Anyway, your issue is likely in parseInt
, which does not round.
But my number are strictly egal to 78 ? why the return value is 77.99999999 even if i remove parseInt it's totaly the same. If i remove 'true, true' so there are more number with this problem
The slider isn't storing its positions as integers. You are taking the output, and instead of rounding, you truncate (so 77.99999999 to 77 instead of 87). You need to set your to
formatter to a function that does the rounding you want, so say to: (value) => Math.round(value)
.
I feel myself dumb.. it work perfectly thanks :)
This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.
Hi, I got some issue with the number i pass to the slider. I use it with 2 associated inputs :
Some numbers (like 78) are unreacheable end always rounded to former value (77 for 78). So if i write 78 in my left input the slider go to 77 as min.
Any idea why ?