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(various): ensure slotchange event is handled properly in hydration #2897

Merged
merged 1 commit into from
Jul 8, 2024

Conversation

kyubisation
Copy link
Contributor

@kyubisation kyubisation commented Jul 5, 2024

In components that have a slotchange event handler for an initialization and no fallback, we need to use the SbbHydrationMixin to ensure the slotchange event is fired even with declarative Shadow DOM.

Copy link
Contributor

@jeripeierSBB jeripeierSBB left a comment

Choose a reason for hiding this comment

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

LGTM, good catch. Would it be possible to have a linting rule for that as tests seem to not cover it?

@github-actions github-actions bot added the pr: lead review approved Pull request has been approved by a lead review label Jul 8, 2024
@kyubisation
Copy link
Contributor Author

Not sure, as I don't think we can differentiate between initializing and updating call. Or do you have an idea? (Also asked via Teams.)

@kyubisation
Copy link
Contributor Author

Discussed via Teams; Linting rule not possible.

@kyubisation kyubisation merged commit 9b5f498 into main Jul 8, 2024
30 checks passed
@kyubisation kyubisation deleted the fix-slotchange-hydration branch July 8, 2024 06:01
@github-actions github-actions bot removed the pr: peer review required A peer review is required for this pull request label Jul 8, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants