primereact icon indicating copy to clipboard operation
primereact copied to clipboard

OverlayPanel: appendTo="body" throws exception

Open RushPVA opened this issue 8 years ago • 3 comments

TypeError: Argument 1 of Node.appendChild is not an object. <OverlayPanel className="ui-g-8" ref={el => this.fieldPicker = el} showCloseIcon={true} dismissable={true} appendTo="body">

http://prntscr.com/his990

RushPVA avatar Dec 04 '17 07:12 RushPVA

Better to use portals here, I'll check this now.

cagataycivici avatar Dec 04 '17 08:12 cagataycivici

Fixed by using portals, we're migrating all appendTos to portals and works great. With 1.3.0, usage should be;

<OverlayPanel appendTo={document.body}></OverlayPanel>

cagataycivici avatar Dec 04 '17 08:12 cagataycivici

appendTo={document.body} -- Can't thank you enough for this answer. Worked perfectly!

lharley avatar Nov 08 '18 22:11 lharley