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

queryAssignedNodes doesn't correctly locate default slot #1002

Closed
arthurevans opened this issue May 20, 2020 · 0 comments · Fixed by #1003
Closed

queryAssignedNodes doesn't correctly locate default slot #1002

arthurevans opened this issue May 20, 2020 · 0 comments · Fixed by #1003
Assignees
Milestone

Comments

@arthurevans
Copy link
Contributor

Description

Currently, if you use the queryAssignedNodes decorator with no argument, it retrieves the first <slot> in the template, whether or not it has a name attribute.

For example, given the code:

@queryAssignedNodes()
defaultNodes;

render() {
  return html`
     <slot name="header"></slot>
    <slot></slot>
    <slot name="footer"></slot>
}

The defaultNodes parameter returns the contents of the first slot, not the second, as you'd expect.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants