Slider component not initializing as expected with values over 100.
Describe the bug When you set Slider.Value to a number greater than 100 during initial binding, it gets trimmed to 100 (even when the Max is much higher).
To Reproduce Steps to reproduce the behavior:
-
Create a Slider with the following:
<Slider TValue="int" Min="10" Max="1000" Value="900" Step="5" Class="slider">Cool slider</Slider> -
Click F5 and start your app.
-
Notice the slider thumb is displayed at a lower value (looks like about where 100 would be). But it's Value property is correct.
-
If you use the slider, it will move up past that value and up to the Max.
Expected behavior The slider should start about 90% through the slider (near the right end). But it stays at about 100 (about 10%).
Additional context
Note: This works fine if the value range is between 1 through 100, like:
I can reproduce it on my side also. Definitely a bug. So far I cannot see where's the problem. Min and Max is set and Value is parsed just as it should be. No reason to act like this.
Yeah, it is very weird. I tried the same with input range in html directly and that worked as expected. I didn't see anything in the Slider class that did anything different. Is there some javascript that could be doing that?
Unless bootstrap itself is doing something, then no, there is no javascript for Slider component.
I tried everything so far, removed every attribute one by one, tried diferent combination of value, min, max and other attributes. It works on random so I really cannot figure what is going on. Slider is actually the easiest component on Blazorise. Really weird...
Maybe I should see if Bootstrap is doing something 🤔
I am using the Blazorise.Bootstrap package, so maybe... I agree it is very, very weird.
Fixed by @MitchellNZ