LinusBorg / portal-vue

A feature-rich Portal Plugin for Vue 3, for rendering DOM outside of a component, anywhere in your app or the entire document. (Vue 2 version: v2.portal-vue.linusb.org)
http://portal-vue.linusb.org
MIT License
3.9k stars 187 forks source link

$parent #394

Closed gotshadowbantempaccount closed 1 year ago

gotshadowbantempaccount commented 1 year ago

can;t access $parent from portal i.e method from parent component addsomthing()

this.$parent.addsomthing()

this.$parent.addsomthing is not a function

https://stackoverflow.com/questions/46208610/call-parent-method-with-component

LinusBorg commented 1 year ago

Yeah that's expected and not really fixable.

https://portal-vue.linusb.org/guide/caveats.html#parent

gotshadowbantempaccount commented 1 year ago

@LinusBorg thank you, just fixed now by just passing function as prop