Skip to content
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

target multiple not working when slim #258

Open
btoo opened this issue Oct 9, 2019 · 1 comment
Open

target multiple not working when slim #258

btoo opened this issue Oct 9, 2019 · 1 comment

Comments

@btoo
Copy link
Contributor

btoo commented Oct 9, 2019

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

@LinusBorg
Copy link
Owner

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.

btoo added a commit to btoo/portal-vue that referenced this issue Oct 10, 2019
LinusBorg added a commit that referenced this issue Nov 27, 2019
* docs: add warning in docs about using slim with multiple (#259)

#258

* Fix typo in README.md (#274)

* docs: fix typo (#257)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants