Closed lukethacoder closed 4 years ago
Describe the bug
<slot></slot> does not render markup.
<slot></slot>
The following renders fine once it is pushed to an org.
<!-- customButton.html --> <template> <button data-type={type}> Button: <slot></slot> </button> </template>
<!-- anotherComponent.html --> <div class="slds-col slds-size_12-of-12"> <c-custom-button type="primary"> <p>primary</p> </c-custom-button> </div>
Above example renders the Button: text on the child item, but not the <p>primary</p> from the parent component.
Button:
<p>primary</p>
To Reproduce Steps to reproduce the behavior:
Expected behavior <slot></slot> should work as it currently does when viewing on platform.
Desktop (please complete the following information):
well... looks like this was a bug on my end. was incorrectly referencing the @api value in the connectedCallback(), which silently bricks your component.
@api
connectedCallback()
Describe the bug
<slot></slot>
does not render markup.Above example renders the
Button:
text on the child item, but not the<p>primary</p>
from the parent component.To Reproduce Steps to reproduce the behavior:
<slot></slot>
Expected behavior
<slot></slot>
should work as it currently does when viewing on platform.Desktop (please complete the following information):