PanelMenu nested subitems no longer get the expanded prop #15403
Labels
Type: Bug
Issue contains a bug related to a specific component. Something about the component is not working
Milestone
Describe the bug
In previous version 16.x.x 2nd & 3rd level nested sub menu items also had an expanded prop in the model when toggled open. In versions 17.x.x they are no longer getting the expanded prop. Only the 1st level parent items.
This makes it impossible to persist the expanded state of the panel menu beyond the first level. On a page refresh the menu will be reset to it's original state and user loses context.
Environment
Angular 18.0.1
Reproducer
Toggle the menu a few items deep. The model will update below. Notice no nested items get an expanded attribute. Only top level parents. If you manually add expanded attribute to nested child (Documents) it won't update either. Notice how Files changes from false to true.
https://stackblitz.com/edit/s5kubx-5x7cem?file=src%2Fapp%2Fpanel-menu-basic-demo.html
Angular version
18.0.1
PrimeNG version
17.18.0
Build / Runtime
Angular CLI App
Language
TypeScript
Node version (for AoT issues node --version)
20.9.0
Browser(s)
No response
Steps to reproduce the behavior
Toggle a panel menu with 3rd or 4th level items. Inspect the model and you will see the nested parent items do not have the expanded: true property.
Expected behavior
No response
The text was updated successfully, but these errors were encountered: