reactjs-popup icon indicating copy to clipboard operation
reactjs-popup copied to clipboard

Rendering not in body

Open lishine opened this issue 5 years ago • 4 comments

Hi,

My application is embedded (not iframe), I want to render the popup-root under the application root. Another problem that I see is that popup-content has element styles which I cannot override.

lishine avatar Dec 16 '20 11:12 lishine

@yjose Is this possible? I found a PR to implement this from a couple years ago that was rejected, but 2.0 updated to Portals. Seems like this should be more easily possible now? I can work on PR if it would help.

SimplyComplexable avatar Jan 29 '21 01:01 SimplyComplexable

@lishine I looked through the source and you can see here that if you add an element to with an id of popup-root it will render into that element. I tested this for my situation and it worked perfect!

SimplyComplexable avatar Jan 29 '21 16:01 SimplyComplexable

@SimplyComplexable can you add it somewhere in the docs

yjose avatar Jan 29 '21 23:01 yjose

@yjose I created PR #239 let me know if you want any updates.

SimplyComplexable avatar Feb 08 '21 17:02 SimplyComplexable