Commit Graph

10 Commits

Author SHA1 Message Date
Georges KABBOUCHI a4437719c7 Revert "reactive singleton"
This reverts commit 8bfb1ecfda.
2024-06-28 16:22:20 +03:00
Georges KABBOUCHI 8bfb1ecfda reactive singleton 2024-06-26 20:18:11 +03:00
Konrad Kügler 44b67e46b9 Add support for <Tippy> as a child (issue #123 in 6.x)
Having <Tippy> as a child of an element to tooltip was a nice use-case
in 4.x. See https://github.com/KABBOUCHI/vue-tippy/issues/123.
We re-add this in a similar manner.

Using to="parent" (as a fixed string), one can now use either the main
<Tippy> slot ("default") or its specific "content" slot to specify
the tooltip content.
The tooltip will be triggered on the parent element without
adding a specifc Tippy node to the DOM.

This should provides a non-interfering way to specify tooltips.

Implementation:
For the to="parent" case, we need to find the parent DOM element, but in
the "worst" case <Tippy> won't render any DOM nodes at all, which could
help us to find the parent.
Instead, we initially render a hidden <span> (and the tooltip content).
Using the span as a template ref ('findParentHelper'), we can get the
parent and assign that to the actual 'elem' ref. This will trigger a
re-render, where we can drop the helper <span> again.
2023-07-31 21:28:18 +02:00
Georges KABBOUCHI 33ae76e20a v6.0.0-alpha.34 2021-10-09 13:13:56 +03:00
Raymond Muller 6b4e05e834 feat: string support 2021-09-29 17:29:22 +02:00
Georges KABBOUCHI 1530438d94 allow html by default in singleton 2021-08-08 15:16:25 +03:00
Georges KABBOUCHI bd39c6cd54 singleton component 2021-03-09 13:12:57 +02:00
Georges KABBOUCHI a945719803 pass tippy component instance to the default slot 2021-01-17 14:03:11 +02:00
Georges KABBOUCHI d9000fb222 update playground 2021-01-17 13:44:12 +02:00
Georges KABBOUCHI a6c61fbeb8 pass tippy instance for the content slot and fix nested components 2021-01-17 13:27:54 +02:00