portal-vue icon indicating copy to clipboard operation
portal-vue copied to clipboard

Same scope data attribute for different components

Open sebastian-walter opened this issue 5 years ago • 1 comments
trafficstars

Hi there,

I use portal-vue for building dropdowns and modals. I therefore use one portal-target for all dropdowns and modals. This is needed to make sure that the last one added is last and therefore shown on top of the other existing dropdowns and modals.

The problem that occurs is that the data attribute for scoped styles is the same for all components, which I don't completely understand. I was thinking that the inner components get the data attribute from the component they are used but somehow they are all the same (see screenshot).

For now I will solve that by not scoping styles and create my own uid to make sure the styles do not collide with others.

Any ideas on that on how to improve it and what I am missing here?

Screenshot from 2020-04-22 12-07-52

sebastian-walter avatar Apr 22 '20 10:04 sebastian-walter

HI! Can you please provide a small reproduction, i.e. on codesandbox.io ?

LinusBorg avatar Apr 22 '20 18:04 LinusBorg