Cannot set the position of the teleport's element
What problem does this feature solve?
I tried to use teleport to insert the element into the first position of <body>
, but the teleport seems to be unable to set the position prepend
and always append
to <body>
.
What does the proposed API look like?
Maybe we can add a prop, prepend
or append
or add a order
prop, https://portal-vue.linusb.org/api/portal.html#order
I think we discussed this in the original RFC for Teleport
and found that the added complexity in the renderer for updates etc, especially concerning order
, wasn't worth it, at least initially.
A simple workaround for prepending in body
is to add an empty as the first child of body
and mount to that.
I'm currently experimenting with a thin layer over Teleport that might provide more complex stuff like order
- would be a spiritual successor to portal-vue