-
-
Notifications
You must be signed in to change notification settings - Fork 187
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
$store is undefined when using <MountingPortal> #199
Comments
I'll rate this a bug and look into it, thanks for reporting. Edit: Found the iussue: Now the question is, WTH did comment that out? Will fix it and add a test for it. |
Would you want the generated Portal-Target parent to be the Portal creating it ( |
In the context of this issue, both should work. However I would tend to the second as that would mean that the number of steps to reach the portal's parent is the same as with a normal portal. But I have to double check |
Or could do the following: parent = this.$parent || this |
@bgondy Did that fixed your issue? I'm using 2.1.5 and having the issue with Vue-i18n throwing I'm using it through morkro/vue-a11y-dialog which is using Once I move my child component outside of the Portal, everything works fine. |
@LeBenLeBen Yes it fixed the issue with VueX. On the other hand, I faced the exact same issue with i18n on a previous project and I have had to roll back to v1 to get it working (time was running out…). But I think this is more related to how Vue-i18n works than portal-vue. Please take a look at my comment here : kazupon/vue-i18n#184 (comment) Hope it helps. |
When I use
<MountingPortal>
to render a component outside of the main Vue component, Vuex is not available.The component is rendered but
this.$store
is not defined.If I use
<Portal>
and<PortalTarget>
,this.$store
exists.With portal-vue@1 and
targetEl
, I have access to the store (but with other known issues though).Is it the expected behavior with the new
<MountingPortal>
component or am I missing something ?Please note I've encountered a similar issue with vue-i18n (See kazupon/vue-i18n#184 (comment)).
The text was updated successfully, but these errors were encountered: