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

Attribute not removed in the DOM ( probably when setting the control back to default value ) #85

Open
herrKlein opened this issue Dec 10, 2024 · 2 comments

Comments

@herrKlein
Copy link

herrKlein commented Dec 10, 2024

Hi,

again, thanks for this helper library. It saves so much time documenting all our components.

I have a reproducible 'bug' when setting a control back to its original state.

I added a shuffle property to the element in your stackblitz example

https://stackblitz.com/edit/github-zzm7be2d?file=README.md,src%2Fmy-element.ts

  @property({ type: String, reflect: true })
  shuffle: 'true' | 'false' = 'false';

There now is a control in storybook, the select.
When I set shuffle to true, the shuffle attribute shuffle="true" is shown inside the code block, and in the dom.

But when setting it back to false in the controls, in the code block the attribute disappears from the element. ( this appears to be correct, it is the default value ) .. but the attribute is not removed in the real dom element, shown in chrome devtools. it still is shuffle="true" in the DOM.

it should be removed in the DOM also.

@herrKlein herrKlein changed the title Attribute not removed in the DOM ( probably when setting it back to default value ) Attribute not removed in the DOM ( probably when setting the control back to default value ) Dec 10, 2024
@break-stuff
Copy link
Owner

Let me take a look.

@herrKlein
Copy link
Author

Any luck finding the problem of this issue?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants