-
Notifications
You must be signed in to change notification settings - Fork 405
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: duplicate behavior for slotted content when no template is present #5174
Conversation
_shadowSlottedContent: any, | ||
_lightSlottedContent: any, | ||
_scopedSlottedContent: any, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
BOOOO
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I had a feeling this might upset you :p
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
(sorry)
@@ -101,27 +101,33 @@ export function renderAttrsNoYield( | |||
} | |||
|
|||
export function* fallbackTmpl( | |||
_shadowSlottedContent: unknown, | |||
shadowSlottedContent: AsyncGeneratorFunction, | |||
_lightSlottedContent: unknown, | |||
_scopedSlottedContent: unknown, | |||
Cmp: LightningElementConstructor, | |||
_instance: unknown |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
_instance: unknown | |
instance: unknown |
yield '<template shadowrootmode="open"></template>'; | ||
yield `<template shadowrootmode="open"></template>`; | ||
if (shadowSlottedContent) { | ||
yield shadowSlottedContent(_instance); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yield shadowSlottedContent(_instance); | |
yield shadowSlottedContent(instance); |
} | ||
} | ||
|
||
export function fallbackTmplNoYield( | ||
emit: (segment: string) => void, | ||
_shadowSlottedContent: unknown, | ||
shadowSlottedContent: AsyncGeneratorFunction, | ||
_lightSlottedContent: unknown, | ||
_scopedSlottedContent: unknown, | ||
Cmp: LightningElementConstructor, | ||
_instance: unknown |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
_instance: unknown | |
instance: unknown |
emit('<template shadowrootmode="open"></template>'); | ||
emit(`<template shadowrootmode="open"></template>`); | ||
if (shadowSlottedContent) { | ||
shadowSlottedContent(emit, _instance); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
shadowSlottedContent(emit, _instance); | |
shadowSlottedContent(emit, instance); |
Details
Does this pull request introduce an observable change?
GUS work item
W-17657735