Skip to content

Slot name is not updated when it is bind to a prop #2982

@mergin

Description

@mergin

Stencil version:

 @stencil/core@2.6.0

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:

The slot name is not updated when it is bind to a prop, so it can show only the slotted element that matches de name.

<slot name={this.prop}><slot/>

Then, in the HTML

<cmp-content>
  <div slot="tab1">
    Content Tab 1
  </div>
  <div slot="tab2">
    Content Tab 2
  </div>
  <div slot="tab3">
    Content Tab 3
  </div>
</cmp-content>

Expected behavior:

The slot name should dynamically change.

Steps to reproduce:

Other information:

This used to work in versions <2.0.0. After upgrading my repo to version 2.6.0, this stopped working.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Bug: ValidatedThis PR or Issue is verified to be a bug within Stencilslot-related

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions