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

fix select regressions #2255

Merged
merged 11 commits into from
Dec 2, 2024
Merged

fix select regressions #2255

merged 11 commits into from
Dec 2, 2024

Conversation

KonnorRogers
Copy link
Collaborator

@KonnorRogers KonnorRogers commented Nov 4, 2024

Fixes regressions introduced with allow lazily loaded options prior to a user interacting.

This does introduce one breaking change.

if you do select.setAttribute("value", "new-value") after a user has interacted with the <select> or if you have manually set the value property, then it will no longer update.

IE:

<sl-select multiple clearable value="foo bar">
  <sl-option value="foo">Foo</sl-option>
  <sl-option value="bar">Bar</sl-option>
</sl-select>

If I de-select "bar" and then do select.setAttribute("value", "foo bar") it will not re-select bar. I would have to do select.value = ["foo", "bar"]

Copy link

vercel bot commented Nov 4, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Updated (UTC)
shoelace ✅ Ready (Inspect) Visit Preview Dec 2, 2024 6:24pm

Copy link
Member

@claviska claviska left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for tracking this one down! 😅

@KonnorRogers
Copy link
Collaborator Author

Fixes #2254

@claviska claviska merged commit a8900fd into next Dec 2, 2024
1 of 2 checks passed
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

Successfully merging this pull request may close these issues.

2 participants