primeng
primeng copied to clipboard
Tiered Menu autoDisplay does not work unless clicking into the menu.
Describe the bug
For TieredMenu when the autoDisplay is set to true(default), you still have to click into the menu and then once you click. the autoDisplay works. If you view the docs from v17 you can just put your mouse on a menu item and it will display the popup. without have to click.
Pull Request Link
No response
Reason for not contributing a PR
- [x] Lack of time
- [ ] Unsure how to implement the fix/feature
- [ ] Difficulty understanding the codebase
- [ ] Other
Other Reason
No response
Reproducer
https://primeng.org/tieredmenu
Environment
https://primeng.org/tieredmenu
Angular version
19.0.0
PrimeNG version
v19
Node version
No response
Browser(s)
No response
Steps to reproduce the behavior
Go to the docs for TieredMenu https://primeng.org/tieredmenu
Hover over a menu item and no popup submenu will show up.
Expected behavior
In v17 it is working correctly see here https://v17.primeng.org/tieredmenu
Hover over a menu item and a popup submenu will show up.
Due to PrimeTek's demanding roadmap for PrimeNG, this issue is available for anyone to work on. Make sure to reference this issue in your pull request. :sparkles: Thank you for your contribution! :sparkles:
fyi, this also occurs in v18
This helped me:
@ViewChild('menuPopup') menuPopup!: TieredMenu;
showMenu(event: MouseEvent): void {
this.menuPopup.toggle(event);
// Fix:
setTimeout(() => {
(this.menuPopup as any).dirty = true;
}, 0);
}
<p-tieredMenu
#menuPopup
[autoDisplay]="true" <--- should be true
/>
Any update on this? There is at least one PR that solves it? https://github.com/primefaces/primeng/pull/17619