-
-
Notifications
You must be signed in to change notification settings - Fork 8.3k
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
$parent doesn't skip transition components #2437
Comments
In v3 there really isn't the concept of "abstract" components (i.e. ones that are omitted from parent chains) anymore, so this is expected behavior (and yes, technically a breaking change from v2, but the idea is that the usage of I think the actual issue here is that Note: In v2, functional components do not show up in the parent chain at all. To fix this we should probably make the |
I'm not sure that's exactly the issue here. Functional components don't have instances, they are only represented by vnodes. The parent that is returned by From my tests, doing this:
would give me the parent component that contains the |
You are using The internal |
I know. But that fails when a BaseTransition is the parent. |
That's why I'm suggesting the fix is going further up the parent chain when |
Got it. |
Version
3.0.1
Reproduction link
https://codesandbox.io/s/clever-paper-9zw1d?file=/src/components/HelloWorld.vue
Steps to reproduce
What is expected?
console output:
What is actually happening?
console output
In Vue 2, the transition component was "abstract" and $parent skipped it, so components could reach the "real" parent component.
Now, the parent of a component nested in an transition is a
BaseTransition
instance, and, adding to the problem, this component doesn't have a public proxy with a$parent
property, so developers can't even manually skip it by callingthis.$parent.$parent
The text was updated successfully, but these errors were encountered: