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(combobox): improve prop update times #11383

Merged
merged 5 commits into from
Jan 25, 2025

Conversation

jcfranco
Copy link
Member

@jcfranco jcfranco commented Jan 25, 2025

Related Issue: #10731

Summary

Fixes prop update delays introduced in #10310 by moving event emitting to Lit's pre-update phase.

BEGIN_COMMIT_OVERRIDE
omitted from changelog
END_COMMIT_OVERRIDE

@github-actions github-actions bot added the bug Bug reports for broken functionality. Issues should include a reproduction of the bug. label Jan 25, 2025
@jcfranco jcfranco added the pr ready for visual snapshots Adding this label will run visual snapshot testing. label Jan 25, 2025
@jcfranco jcfranco requested review from driskull and benelan January 25, 2025 00:15
Copy link
Member

@driskull driskull left a comment

Choose a reason for hiding this comment

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

Nice! 💯

@@ -741,8 +749,8 @@ export class Combobox
}

private getValue(): string | string[] {
const items = this.selectedItems.map((item) => item?.value?.toString());
return items?.length ? (items.length > 1 ? items : items[0]) : "";
const items = this.selectedItems.map((item) => item.value?.toString());
Copy link
Member

Choose a reason for hiding this comment

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

This .toString() reminds me of #11370 where we may want to consider changing value from any to string.

@jcfranco jcfranco merged commit d72375f into dev Jan 25, 2025
20 checks passed
@jcfranco jcfranco deleted the jcfranco/10731-fix-combobox-prop-update-timings branch January 25, 2025 00:44
@jcfranco jcfranco added the no changelog entry Use the commit override to avoid a changelog entry label Jan 25, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Bug reports for broken functionality. Issues should include a reproduction of the bug. no changelog entry Use the commit override to avoid a changelog entry pr ready for visual snapshots Adding this label will run visual snapshot testing.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants