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

Dynamic props not working with slots after 2.6x update. #9444

Comments

@DotNetGit
Copy link

DotNetGit commented Feb 6, 2019

Version

2.6.2

Reproduction link

no link

Steps to reproduce

Create component with slot, add dynamic prop "itemName" to slot like this:

<slot :[itemName]="item" name="item-content" />

What is expected?

Dynamic prop is binded to the slot.

What is actually happening?

Dynamic prop is not binded to the slot.


I used the syntax below for a long time until the update 2.62:

<slot :[itemName]="item" name="item-content" />

After the update it is not working, I had to change it across all projects to the following:

<slot v-bind="{ [itemName]: item }" name="item-content" />

But the docs from here told that the first snippet has a valid syntax.

What is wrong with dynamic props or slots or maybe with them both or just this syntax do not work anymore?

Regards.

@posva
Copy link
Member

posva commented Feb 6, 2019

Take the time to provide a boiled down repro thank you!

@posva posva closed this as completed Feb 6, 2019
@yyx990803 yyx990803 reopened this Feb 6, 2019
@yyx990803
Copy link
Member

Able to reproduce... funny that this even worked in 2.5.x (when it shouldn't) and somehow broke in 2.6 (when it should)!

@DotNetGit
Copy link
Author

@yyx990803 , Thanks a lot.

Lostlover pushed a commit to Lostlover/vue that referenced this issue Dec 10, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment