vue-slider-component: [Vue-slider warn]: Prop[interval] is illegal, Please make sure that the interval can be divisible
Thanks for this amazing component!
I have a warning in console:
[Vue-slider warn]: Prop[interval] is illegal, Please make sure that the interval can be divisible
My parameters are: ‘min’: 0, ‘max’: 4, ‘interval’: 0.1
What am I doing wrong? Thanks for your help!
About this issue
- Original URL
- State: closed
- Created 7 years ago
- Comments: 20 (11 by maintainers)
@devorld Thank you, the version has been updated.
Now you can solve this, just like:
Thanks, that you are so responsive!
I have tested with the same values and continue getting error message, but I think I understood the idea of this check.
We are checking if our range (
this.max - this.min) divides by step (this.inteval) without remainder, am I right?Like when we have
min = 0,max = 10and step between internal pointsinterval = (max-min) / 10.I thought that there will be problem with achieving
maxvalue, but I’ve tested, and component greatly work with that case.To summarize:
P.S.: Can you add some flag or condition, to switch off this notification in production mode? For example
There is such a problem, in the case of the interval is a decimal, there will be such a problem
4 % 0.1 = 0.09999999999999978.I will fix the bug as soon as possible and post a new version.
Thank you for the issue