Slider converts Number values into String
iamDecode opened this issue · 2 comments
Expected Behavior
When you use a <d-slider :v-model="test">
component to alter a data() variable test
, test takes on the value of the slider of type Number
.
Current Behavior
Even if variable test is a Number
before, after slider updates will convert it into a String
.
Steps to Reproduce
Just bind d-slider to any variable, bug is very consistent.
Context (Environment)
I am using d-slider components to test if my system is updating correctly (during development). Currently I have to parseFloat all my variables that I want to change, which is fairly tedious.
Possible Solution / Possible Implementation
Use parseFloat
on the value that is emitted perhaps?
@iamDecode Thanks for submitting this! 😁I think this is caused by how thenoUiSlider.get()
method works and returns a string
for the value as far as I know (the method is used internally to get the slider's value). I'll check it out in more depth and get back to you soon.
I apologize for the delay. I'm afraid this won't go into Shards Vue since it's specific to how noUiSlider works by default.