menu: appendTo values other than body not working correctly in v18 #16795
Labels
Status: Pending Review
Issue or pull request is being reviewed by Core Team
Milestone
Describe the bug
When
Menu.appendTo
is set to a value other than"body"
the menu items are not appended to the element passed via template ref, but rather the element is appended to the menu items.Changing the order of the parameters fixes this:
This actually appears to be backwards everywhere that the @primeuix/utils version of
appendChild
is called.Environment
Fresh download of the
v18
branch running the showcase app with a menu added to a button will reproduce this. Personally running on an Apple silicon Mac with node 18.19.1.Reproducer
https://stackblitz.com/edit/github-l2mr75?file=src%2Fapp%2Fapp.component.html
Angular version
18
PrimeNG version
18.0.0-rc.1
Build / Runtime
Angular CLI App
Language
TypeScript
Node version (for AoT issues node --version)
18.19.1
Browser(s)
No response
Steps to reproduce the behavior
Menu
component with[appendTo]="someTemplateRef"
menu.ts
to reverse the order of the parameters forappendChild
Expected behavior
Menu items should appear appended to the element passed in via
appendTo
The text was updated successfully, but these errors were encountered: