Join GitHub today
GitHub is home to over 40 million developers working together to host and review code, manage projects, and build software together.
Sign upScoped Slot warns when used inside of dynamic component on regular element #10152
Comments
This comment has been minimized.
This comment has been minimized.
As the warning says If you only have one scoped slot, you should be able to do <tr :is="customComp" v-slot="data"></tr> |
This comment has been minimized.
This comment has been minimized.
Hi @posva , thanks a lot for your comment! As suggested, I have also tried to use <div is="test-component">
<template v-slot:default="slotProps">
slotProps: {{slotProps.test}}
</template>
</div> However that produces a warning as well, see fiddle: When avoiding the DOM template parsing caveats, it works just fine: <test-component>
<template v-slot:default="slotProps">
slotProps: {{slotProps.test}}
</template>
</test-component> but I believe I need to use the caveat, when using the component on a Also, would you mind explaining this comment a bit more?
Thanks! |
This comment has been minimized.
This comment has been minimized.
I updated my comment but the warning seems to appear anyway, the warning shouldn't appear indeed |
…ponent fixes vuejs#10152
Version
2.6.10
Reproduction link
https://jsfiddle.net/mybeta/1dfwsazn/
Steps to reproduce
When I use DOM Template Parsing Caveats to add a component (e.g.
<tr is="custom-row">
) I can't use scoped slots (slotProps) without receiving a warning in the console. I would like to use it this way:What is expected?
No warning.
What is actually happening?
I get the following warning in the console.
The rest looks like it works as expected.