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

Add appendTo to overlay components #1148

Closed
lukasschinninger opened this issue Apr 6, 2021 · 4 comments
Closed

Add appendTo to overlay components #1148

lukasschinninger opened this issue Apr 6, 2021 · 4 comments

Comments

@lukasschinninger
Copy link

Currently for overlay components (like Dialog,Sidebar,etc) its not possible to set the appendTo attribute. So the dialog element directly gets appended to the body
image
image
and scoped css ( in this example the .inc class) is not working.

With appendTo it should be possible:
image
image

Can you add support for appendTo (like in DatePicker or DropDown) for these components ?

@afonic
Copy link

afonic commented Apr 7, 2021

The problem is that many overlay components were changed to use Vue 3's teleport feature, but teleport cannot be used inside the Vue app itself. So appendTo is impossible. This creates all kinds of problems in a variety of cases that are not trivial to fix.

Here is a relevant issue: #1083

@cagataycivici
Copy link
Member

This is related to Vue teleport, we should rely on the vue runtime to resolve this. For example, in React, teleport is much more flexible whereas in Vue teleport cannot be used within the app. So appendTo is pretty useless.

@afonic
Copy link

afonic commented Apr 14, 2021

@cagataycivici there is no indication that Vue will resolve this though.

In my opinion you could maybe revert the decision to use Vue teleport in a number of components? See #1028

@cagataycivici
Copy link
Member

cagataycivici commented Apr 16, 2021

This may help -> #1185

We added "self" so it stays as a part of the element. I even solved a couple of cases with appendTo="self". So we not support "body" (default), "self" and any other thing that teleport supports.

There is also panelClass for components to help with scoping where the class is applied to the overlay.

Still if you have issues with 3.4.0, please create a new ticket, there is always room for improvement.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants