Closed Daymannovaes closed 3 years ago
Unfortunately this is a known issue reported in https://github.com/material-components/material-components-web/issues/1426. I'll add it to our backlog to track.
I need this solved as well. I need to wrap it into a MWC FloatSlider
that takes discrete value, min, max and step.
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>MWC Slider</title>
<script src="https://unpkg.com/@material/mwc-slider@0.18.0?module" type="module"></script>
<link href="https://fonts.googleapis.com/css?family=Roboto:300,400,500" rel="stylesheet">
<link href="https://fonts.googleapis.com/css?family=Material+Icons&display=block" rel="stylesheet">
</head>
<body>
<mwc-slider style="width:100%" value="5.2" min="4.2" max="5.6" step="0.1"></mwc-slider>
</body>
</html>
Looks like I have similar issue, this is my code :
`
`
I can't drag the slider thumb, it stuck on the left side
Hello.. Is this issue on the radar? Looks no response yet longer time.
The slider does not support float steps. You will need to work around this by normalizing your min, max and step values.
What do you mean does not support float steps? Sounds like no plan to support this bug? I was using paper-slider on my previous polymer projects and no problem with float steps. Since migrating all to litelement, I decided to replace all webcomponents with mwc UI including mwc-slider.
Due to this issue, I'm using my own slider component written in litelement for a while. I thought mwc team will support and fix this bug.
I’m a user of mwc. Not a developer.
I just mean that it does not Work and it’s not like mwc ships bug fixes and new features often i believe.
I’ve starting looking for other web component frameworks with more momentum like Fast for this reason.
Well, I'm trying adjust the mwc-slider by creating extended class here :
https://github.com/mahdiridho/mwc-slider-extended
So, I can work with floating points now. I'm not sure it's good solution or no, at least it works for me
Describe the bug I'm building a slider that goes from -1 to 1, with steps sized 0.01. But the UI doesn't work properly, and the values only are able to be set as -1, 0 and 1.
To Reproduce Steps to reproduce the behavior:
the HTML goes like this:
Expected behavior The values should range from -1 to 1 continuously, instead of only discrete values (-1 0 1).
Screenshots
Browser Version (please complete the following information):