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

add Property getNestedPopperElements#1151

Open
mwoess wants to merge 1 commit intoatomiks:masterfrom
mwoess:master
Open

add Property getNestedPopperElements#1151
mwoess wants to merge 1 commit intoatomiks:masterfrom
mwoess:master

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