-
-
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
Multiple targets, one portal #221
Comments
That would cause the same Vue vNodes to appear in multiple spots in the document, which is a Vue no-no (no duplicate VNodes) |
It could work with scoped slots |
That would be true.. but you would have to ensure that it only works when the default slot is a function |
Correct. |
Won't add this in the Vue 2 version, too hacky. Likely better achievable in the Vue 3 version |
Currently we can do it if multiple portal-tagret have the same name, is there an issue with this ?
It trigger this warning
|
Just like @mrleblanc101 I am wondering whether a single portal to multiple portal-tagets is possible. Currently everything seems to be working fine, but the warning is still being thrown. In my situation I am using a solution based on https://github.com/altinselimi/kalendar. This is a week view of events. Every event gets a portal-target with the name Since the slot should be the same for every event (and for every target) it is a fine outcome to reuse the portal into multiple targets. Is this something that should be avoided or is this actually a case where it makes sense? (So basically the opposite of https://portal-vue.linusb.org/guide/getting-started.html#multiple-portals-one-target) Root:
For each event:
Since the slot-props are different for each event the rendered DOM is different for each portal. |
Would it be possible to have the
to
prop accept an array of portal targets?The text was updated successfully, but these errors were encountered: