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

Scoped-slot not acknowledged in nested template tag #7904

Closed
privatenumber opened this issue Mar 27, 2018 · 3 comments
Closed

Scoped-slot not acknowledged in nested template tag #7904

privatenumber opened this issue Mar 27, 2018 · 3 comments
Labels

Comments

@privatenumber
Copy link
Contributor

Version

2.5.16

Reproduction link

https://jsfiddle.net/hirokiosame/38nzxq6c/2/

Steps to reproduce

Just execute the JSfiddle. You'll notice the scoped-slot isn't being rendered.

What is expected?

For the scoped-slot to be rendered.

What is actually happening?

The scoped-slot is not in this.$scopedSlots and not being rendered.


The minimal reproduction is a little unpractical because who would unnecessarily nest content in an attribute-less template tag. This JSfiddle is more reflective of the real use-case we're dealing with: https://jsfiddle.net/hirokiosame/38nzxq6c/

@posva
Copy link
Member

posva commented Mar 27, 2018

Marked as both bug and improvement because I'm not sure it was intended to work so it could also be an improvement

@binary-koan
Copy link

Not sure if this is the same issue, but adding two elements with slot-scope in the default slot also causes the first one to be ignored: https://codepen.io/binary-koan/pen/BPyyKW

It wouldn't surprise me to learn that this is intentional, but it was odd to have <parent><child /><child /></parent> work, but stop working when changed to <parent><child slot-scope /><child slot-scope /></parent> with no warning message.

@yyx990803
Copy link
Member

Closing as wontfix. Slot content must be at top level inside the component tag.

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

No branches or pull requests

4 participants