How to use with Portals?
See original GitHub issueBroke my head trying to figure out how to use Tippy content in react portal… Something like this isn’t working:
<Tippy
      render={attrs => (
        <div {...attrs} onClick={() => setVisible(false)}>
          {ReactDOM.createPortal(
              props.content,
              document.getElementById("root-context-menu")!,
            )}
        </div>
      )}
...> button </Tippy>
because container with absolute positioning remains outside of portal. Wrapping Tippy into portal also won’t work because I don’t want button to be in the portal. Any hints? Thanks!
Issue Analytics
- State:
 - Created 3 years ago
 - Comments:6 (1 by maintainers)
 
Top Results From Across the Web
Portals - React
Portals provide a first-class way to render children into a DOM node that exists ... A typical use case for portals is when...
Read more >How to use Portals - Dump Stat Adventures
A way to use portals in your games is by using a timed portal that only has a specific amount of time it...
Read more >How to use portals in No Man's Sky - Polygon
With the correct item in your inventory, select “locate portal,” and it will show up on your map. No Man's Sky portal glyphs...
Read more >A Guide To Portals In 'No Man's Sky Next' - Forbes
You can use a portal to find your location in the galaxy after all 16 Runes are charged. It's a good idea to...
Read more >How to Use Multiverse Portals - Knowledgebase - Shockbyte
Making your first portal · As an operator, enter the command /mvp wand . If you do not have access to this command...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found

Hey, Sorry to open this issue again. I ran to the same issue using an
interactivetippy. it doesn’t get appended tobodyby default. although I must say addingappendTo={document.body}solved it.hmm, it doesn’t… It appends into the place where its used in my case… That’s why I wanted to use portals - to prevent styles inheritance. What can I do wrong that leads to my use-case?
edit1: added a screenshot that shows its not in the body:
edit2:
appendTo={document.getElementById("root-context-menu")!}worked as expected.