vuejs / core

🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
https://vuejs.org/
MIT License
47.7k stars 8.33k forks source link

Transition: Reusable/Wrapped Transition not working #6081

Open benjaminrobinet opened 2 years ago

benjaminrobinet commented 2 years ago

Vue version

3.2.37

Link to minimal reproduction

https://sfc.vuejs.org/#eyJBcHAudnVlIjoiPHNjcmlwdCBzZXR1cD5cbiAgaW1wb3J0IE15VHJhbnNpdGlvbiBmcm9tIFwiLi9NeVRyYW5zaXRpb24udnVlXCI7XG4gIGltcG9ydCB7IHJlZiwgY29tcHV0ZWQgfSBmcm9tIFwidnVlXCI7XG4gIFxuICBjb25zdCBkYXRhID0gcmVmKFt7Y29udGVudDogJzxwPkFCQzwvcD4nfSwge2NvbnRlbnQ6ICc8cD5ERUY8L3A+PHA+R0hJPC9wPid9XSlcbiAgY29uc3QgY3VycmVudERhdGFJbmRleCA9IHJlZigwKTtcbiAgY29uc3QgY3VycmVudERhdGEgPSBjb21wdXRlZCgoKSA9PiB7XG5cdFx0cmV0dXJuIGRhdGEudmFsdWVbY3VycmVudERhdGFJbmRleC52YWx1ZV07XG4gIH0pXG4gIFxuICBcbiAgc2V0SW50ZXJ2YWwoKCkgPT4ge1xuICAgIGN1cnJlbnREYXRhSW5kZXgudmFsdWUgPSAoY3VycmVudERhdGFJbmRleC52YWx1ZSArIDEpICUgKGRhdGEudmFsdWUubGVuZ3RoKTtcbiAgfSwgMTAwMCk7XG48L3NjcmlwdD5cblxuPHRlbXBsYXRlPlxuICA8ZGl2PlxuICAgIDxUcmFuc2l0aW9uIG5hbWU9XCJmYWRlXCIgbW9kZT1cIm91dC1pblwiPlxuICAgICAgIDxkaXYgY2xhc3M9XCJjb250ZW50XCIgdi1pZj1cImN1cnJlbnREYXRhXCIgOmtleT1cImN1cnJlbnREYXRhXCI+XG4gICAgICAgICA8ZGl2IHYtaHRtbD1cImN1cnJlbnREYXRhLmNvbnRlbnRcIj48L2Rpdj5cbiAgICAgIDwvZG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DxzbG90Lz5cbiAgPC9UcmFuc2l0aW9uPlxuPC90ZW1wbGF0ZT5cbjxzY3JpcHRcdHNldHVwPlxuICBcbjwvc2NyaXB0PlxuPHN0eWxlPlxuPC9zdHlsZT4ifQ==

Steps to reproduce

Create a component wrapping a Transition

What is expected?

Run transition on slots

What is actually happening?

No transitions

System Info

No response

Any additional comments?

No response

benjaminrobinet commented 2 years ago

@bbcvc Isn't the minimal reproduction enough to guess ? I guess the problem is I'm using a ref as element key. But I don't know why it's not working when wrapping the component.