Stencil version:
I'm submitting a:
[x] bug report
[ ] feature request
[ ] support request => Please do not submit support requests here, use one of these channels: https://stencil-worldwide.herokuapp.com/ or https://forum.ionicframework.com/
Current behavior:
Slot inside a loop works for the 1st iteration but not the following ones.
Expected behavior:
Slot inside a loop should work for all the iterations.
Steps to reproduce:
Below is my stencil component.
import { Component, h, State } from "@stencil/core";
@Component({
tag: "list-body",
styleUrl: "list-body.scss",
shadow: false
})
export class Body {
@State() data: Array<String> = ["James", "Carol"];
render() {
return (
<div>
<p>Teachers</p>
{this.data.map(entry => {
return (
<div>
<slot name="salutation"></slot>
<span>{entry}</span>
</div>
);
})}
</div>
);
}
}
<list-body>
<span slot="salutation">Prof.</span>
</list-body>
Expected Result:
<list-body class="hydrated">
<!---->
<div>
<p>Teachers</p>
<div><span slot="salutation">Prof.</span><span>James</span></div>
<div><span slot="salutation">Prof.</span><span>Carol</span></div>
</div>
</list-body>
Actual Result
<list-body class="hydrated">
<!---->
<div>
<p>Teachers</p>
<div><span slot="salutation">Prof.</span><span>James</span></div>
<div><span>Carol</span></div>
</div>
</list-body>
I am not clear if I am doing anything illogical. I really appreciate the help. Thanks in advance!
Stencil version:
I'm submitting a:
[x] bug report
[ ] feature request
[ ] support request => Please do not submit support requests here, use one of these channels: https://stencil-worldwide.herokuapp.com/ or https://forum.ionicframework.com/
Current behavior:
Slot inside a loop works for the 1st iteration but not the following ones.
Expected behavior:
Slot inside a loop should work for all the iterations.
Steps to reproduce:
Below is my stencil component.
Expected Result:
Actual Result
I am not clear if I am doing anything illogical. I really appreciate the help. Thanks in advance!