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

vue-popper wraps components in span, while this is not always desirable

Open andriy-f opened this issue 5 years ago β€’ 3 comments

vue-popper wraps components in span, while this is not always desirable

It's not ok if child elements are div. Div is block element, span is inline, div's can't be inside spans Maybe make wrapper type configurable?

andriy-f avatar Mar 13 '19 19:03 andriy-f

This PR adds this option https://github.com/RobinCK/vue-popper/pull/94

alfonsobries avatar May 28 '19 02:05 alfonsobries

I think this is still an open issue, actually. Looked at the PR that @alfonsobries provided, which is one step to solving the problem, but that only provides a way of overriding one of two possible <span>s.

There's still a hard-coded <span> wrapping the default slot. My guess is this is likely due to use of the v-show directive.

If a v-if directive were used, you could substitute a <template> tag instead, but then it has to be re-rendered every time the display is affected.

I'll try to tinker around a bit, but I don't see any reason why we couldn't also use the <component :is="tagName"> in place of the remaining hard-coded <span> tag.

kevintruby avatar Sep 05 '19 14:09 kevintruby

this good idea, welcome to pr

RobinCK avatar Sep 06 '19 06:09 RobinCK