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 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 join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant