portal-vue
portal-vue copied to clipboard
target multiple not working when slim
trafficstars
If you use both multiple and slim on your <portal-target>, only the first <portal> to send content to the <portal-target> gets to have its content rendered. Here's a reproduction link:
https://codesandbox.io/embed/portal-vue-multiple-slim-rdhet
Yeah well that's expected.
mutliple = you have multiple root notes (at least one from each source) slim = use source content as portal-target's root node (Vue components need one root node) instead of a wrapper div.
So when you define slim, only the first of all the elements coming in will be displayed.
Also happens when you send slot content from a single source, but with multiple elements.
Docs can likely be improved here.