Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cannot update markers attribute on mwc-slider programmatically #1671

Closed
MarcSkovMadsen opened this issue Aug 8, 2020 · 1 comment · Fixed by #2567
Closed

Cannot update markers attribute on mwc-slider programmatically #1671

MarcSkovMadsen opened this issue Aug 8, 2020 · 1 comment · Fixed by #2567
Assignees
Labels
Type: Bug Something isn't working

Comments

@MarcSkovMadsen
Copy link

MarcSkovMadsen commented Aug 8, 2020

I would like to be able to update the markers attribute programmatically. But it does not work

Code

<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="utf-8">
    <title>MWC Slider</title>
    <script src="https://unpkg.com/@material/mwc-button@0.18.0?module" type="module"></script>
    <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="0" min="0" max="10" step="1"></mwc-slider>
    <mwc-button onclick='el=document.getElementsByTagName("mwc-slider")[0];el.setAttribute("markers", "")'>Toggle Markers</mwc-button>
  </body>
</html>

Steps

Open in browser

image

Click button

image

As you can see the markers attribute has been set but the markers are not showing.

Additional Context

It works if the markers are set initially.

@asyncLiz
Copy link
Collaborator

Thanks for the bug report! I'll add this to our backlog to fix

@e111077 e111077 self-assigned this Jul 23, 2021
copybara-service bot pushed a commit that referenced this issue Jul 23, 2021
Upcoming work:

* implement theme
* add component tests

fixes #1885
fixes #2109
fixes #2108
fixes #523
fixes #1028
fixes #1671

PiperOrigin-RevId: 367260030
copybara-service bot pushed a commit that referenced this issue Jul 23, 2021
Upcoming work:

* implement theme
* add component tests

fixes #1885
fixes #2109
fixes #2108
fixes #523
fixes #1028
fixes #1671
fixes #1279

PiperOrigin-RevId: 367260030
copybara-service bot pushed a commit that referenced this issue Jul 23, 2021
Upcoming work:

* implement theme
* add component tests

fixes #1885
fixes #2109
fixes #2108
fixes #523
fixes #1028
fixes #1671
fixes #1279

PiperOrigin-RevId: 367260030
copybara-service bot pushed a commit that referenced this issue Jul 23, 2021
Upcoming work:

* implement theme
* add component tests

fixes #1885
fixes #2109
fixes #2108
fixes #523
fixes #1028
fixes #1671
fixes #1279

PiperOrigin-RevId: 367260030
copybara-service bot pushed a commit that referenced this issue Jul 23, 2021
Upcoming work:

* implement theme
* add component tests

fixes #1885
fixes #2109
fixes #2108
fixes #523
fixes #1028
fixes #1671
fixes #1279

PiperOrigin-RevId: 367260030
copybara-service bot pushed a commit that referenced this issue Jul 24, 2021
Upcoming work:

* implement theme
* add component tests

fixes #1885
fixes #2109
fixes #2108
fixes #523
fixes #1028
fixes #1671
fixes #1279

PiperOrigin-RevId: 367260030
copybara-service bot pushed a commit that referenced this issue Jul 26, 2021
Upcoming work:

* implement theme
* add component tests

fixes #1885
fixes #2109
fixes #2108
fixes #523
fixes #1028
fixes #1671
fixes #1279

PiperOrigin-RevId: 367260030
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Type: Bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants