From 32d0e0a658aec0a0dcbc8ca90f54d39a9a09a8ac Mon Sep 17 00:00:00 2001 From: Jason Verber Date: Wed, 20 Nov 2024 11:20:51 -0600 Subject: [PATCH] Fix: Menu(16795): appendChild param order reversed --- packages/primeng/src/drawer/drawer.ts | 2 +- packages/primeng/src/menu/menu.ts | 2 +- packages/primeng/src/overlaypanel/overlaypanel.ts | 2 +- packages/primeng/src/popover/popover.ts | 2 +- packages/primeng/src/sidebar/sidebar.ts | 2 +- packages/primeng/src/tieredmenu/tieredmenu.ts | 2 +- 6 files changed, 6 insertions(+), 6 deletions(-) diff --git a/packages/primeng/src/drawer/drawer.ts b/packages/primeng/src/drawer/drawer.ts index baa3739c586..82d1d2b27fd 100755 --- a/packages/primeng/src/drawer/drawer.ts +++ b/packages/primeng/src/drawer/drawer.ts @@ -402,7 +402,7 @@ export class Drawer extends BaseComponent implements AfterViewInit, OnDestroy { appendContainer() { if (this.appendTo) { if (this.appendTo === 'body') this.renderer.appendChild(this.document.body, this.container); - else appendChild(this.container, this.appendTo); + else appendChild(this.appendTo, this.container); } } diff --git a/packages/primeng/src/menu/menu.ts b/packages/primeng/src/menu/menu.ts index 082e35e5313..fe58f69fb31 100755 --- a/packages/primeng/src/menu/menu.ts +++ b/packages/primeng/src/menu/menu.ts @@ -519,7 +519,7 @@ export class Menu extends BaseComponent implements OnDestroy { appendOverlay() { if (this.appendTo) { if (this.appendTo === 'body') this.renderer.appendChild(this.document.body, this.container); - else appendChild(this.container, this.appendTo); + else appendChild(this.appendTo, this.container); } } diff --git a/packages/primeng/src/overlaypanel/overlaypanel.ts b/packages/primeng/src/overlaypanel/overlaypanel.ts index efc3593cfad..85567395764 100755 --- a/packages/primeng/src/overlaypanel/overlaypanel.ts +++ b/packages/primeng/src/overlaypanel/overlaypanel.ts @@ -316,7 +316,7 @@ export class OverlayPanel extends BaseComponent implements AfterContentInit, OnD appendContainer() { if (this.appendTo) { if (this.appendTo === 'body') this.renderer.appendChild(this.document.body, this.container); - else appendChild(this.container, this.appendTo); + else appendChild(this.appendTo, this.container); } } diff --git a/packages/primeng/src/popover/popover.ts b/packages/primeng/src/popover/popover.ts index 220c90b95a4..3a18a66e4c5 100755 --- a/packages/primeng/src/popover/popover.ts +++ b/packages/primeng/src/popover/popover.ts @@ -282,7 +282,7 @@ export class Popover extends BaseComponent implements OnDestroy { appendContainer() { if (this.appendTo) { if (this.appendTo === 'body') this.renderer.appendChild(this.document.body, this.container); - else appendChild(this.container, this.appendTo); + else appendChild(this.appendTo, this.container); } } diff --git a/packages/primeng/src/sidebar/sidebar.ts b/packages/primeng/src/sidebar/sidebar.ts index bac3df51643..43035c6bdfe 100755 --- a/packages/primeng/src/sidebar/sidebar.ts +++ b/packages/primeng/src/sidebar/sidebar.ts @@ -377,7 +377,7 @@ export class Sidebar extends BaseComponent implements AfterViewInit, AfterConten appendContainer() { if (this.appendTo) { - return this.appendTo === 'body' ? this.renderer.appendChild(this.document.body, this.container) : appendChild(this.container, this.appendTo); + return this.appendTo === 'body' ? this.renderer.appendChild(this.document.body, this.container) : appendChild(this.appendTo, this.container); } } diff --git a/packages/primeng/src/tieredmenu/tieredmenu.ts b/packages/primeng/src/tieredmenu/tieredmenu.ts index bf1d87ba52e..ec65a03f7c0 100755 --- a/packages/primeng/src/tieredmenu/tieredmenu.ts +++ b/packages/primeng/src/tieredmenu/tieredmenu.ts @@ -972,7 +972,7 @@ export class TieredMenu extends BaseComponent implements OnInit, OnDestroy { appendOverlay() { if (this.appendTo) { if (this.appendTo === 'body') this.renderer.appendChild(this.document.body, this.container); - else appendChild(this.container, this.appendTo); + else appendChild(this.appendTo, this.container); } }