Component: PanelMenu: Submenu displays angledownicon when submenu is collapsed #16781
Labels
Type: Bug
Issue contains a bug related to a specific component. Something about the component is not working
Milestone
Describe the bug
Hello,
We're seeing a couple issues with panel menu's submenus. The primary issue is if you have a submenu's item selected then you go to a different top-level menu and come back, it shows the chevron icon as a down arrow (indicating it's expanded) but the menu is collapsed. Then, when you then click that submenu item, it expands without an animation.
In addition it seems all submenu items collapse without an animation now. This was not the old behavior, before it would collapse with the same animation as the top-level menus. Please let me know if I should create a separate issue for this piece.
Thanks in advance!
Environment
I noticed this when upgrading from Angular 13.3.0 to 18.2.8 and upgrading from PrimeNG 13.4.0 to 17.18.11.
We're using the panel menu in a controlled manner. On route changes we recursively loop through the panel menu and set the expanded property, then update the component's model through the use of a signal.
It appears to be an issue in all browsers.
Reproducer
https://primeng.org/panelmenu#controlled
Angular version
18.2.8
PrimeNG version
17.18.11
Build / Runtime
Angular CLI App
Language
TypeScript
Node version (for AoT issues node --version)
20.12.2
Browser(s)
No response
Steps to reproduce the behavior
The demo on your website seems to be on the same version and has the same issue: https://primeng.org/panelmenu#controlled
To repro at that link:
Click Users > New > Member
Click another top level menu (such as Calendar)
Click Users again and see that the New submenu is using the angledownicon instead of the anglerighticon. In addition, when clicking on the New submenu, there is no animation to open it up.
Expected behavior
The text was updated successfully, but these errors were encountered: