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
A deliberately empty slot-scope attribute will not be rendered as a scoped slot #8912
Comments
I'm pretty sure we talked about this in another issue but couldn't find it 🤔 |
Hi @decademoon I'd like to pick this up, can you check this sandbox and tell me if it's the correct behavior for your use case? |
For my curiosity, what is the use case for doing this? Scott |
@basselAhmed Yes that appears to be correct. @smolinari One example is the |
Um, can you expand that with a real world example, maybe even with code? I'm still not understanding. Sorry. And thanks for being patient with me. Scott |
@smolinari See #8496. Currently Vue doesn't allow a slot to be rendered more than once, the workaround for now is using a scoped slot without meaningful scope arguments. |
Thanks, I'll create a PR for this shortly. |
Thanks. With the breadcrumb separator use case, this issue now makes sense. Scott |
Is that true? Because if you add two default slots, it's rendered twice. (Which I am trying to actually not happen) |
The comment was added before the fix was released |
Version
2.5.17
Reproduction link
https://jsfiddle.net/decademoon/50wL7mdz/759740/
Steps to reproduce
What is expected?
<bar slot-scope>
should be a scoped slot.What is actually happening?
<bar slot-scope>
is rendered as a child as ifslot-scope
were not present.As a workaround, I've been using a dummy variable to force it to be a scoped slot:
<bar slot-scope="scope"/>
The text was updated successfully, but these errors were encountered: