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

Regression for slots and functional components #7958

Closed
blake-newman opened this issue Apr 3, 2018 · 1 comment
Closed

Regression for slots and functional components #7958

blake-newman opened this issue Apr 3, 2018 · 1 comment

Comments

@blake-newman
Copy link
Member

Version

2.5.16

Reproduction link

https://codesandbox.io/s/816m7v3rq9

Steps to reproduce

Create a nested set of functional components, then change the slot definition in the child component. In 2.5.15 the slots are correctly rendered, but in 2.5.16 this is not happening. This is because the slot names are being persisted, so not correctly passed down the chain.

This is a common pattern when creating reusable AHOC components, such as a dropdown with predefined content, but using a lower level component as a structural component.

https://codesandbox.io/s/j44nj82483 (Version 2.5.15)

https://codesandbox.io/s/816m7v3rq9 (Version 2.5.16)

What is expected?

Slots to render in there correct position

What is actually happening?

Slots are not correctly assigned to there correct possition


This is introduced by this ticket: #7710

@TheCommunistCow
Copy link

TheCommunistCow commented Jun 17, 2019

Just an FYI for anyone that runs into this problem in Vue 2.6, this seems to be fixed by switching to the new slot syntax like:
<template v-slot:name></template>

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

No branches or pull requests

3 participants