Skip to content
This repository has been archived by the owner on Nov 9, 2024. It is now read-only.

add Property getNestedPopperElements #1151

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

Conversation

mwoess
Copy link

@mwoess mwoess commented Dec 18, 2023

I use tippy.js within the shadow dom of a custom element and need the callback to detect nested instances of tippy.

Example

const instance = tippy(element, {
  // ...
  getNestedPopperElements: (): PopperElement[] => {
    return Array.from<TooltipComponent>(this.querySelectorAll('my-tooltip') || [])
      .map<PopperElement>(tooltip => tooltip.renderRoot.querySelector('[data-tippy-root]') as PopperElement)
      .filter(element => !!element);
    },
});

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

Successfully merging this pull request may close these issues.

1 participant