primeng
primeng copied to clipboard
MenuItem visible property not working in Menu <p-menu> with sub items.
Describe the bug If you set visible to false for a parent MenuItem when there are children, the children are hidden, but the parent is not.
Environment Windows 11
Angular version 14.2.1
PrimeNG version 14.0.2
Build / Runtime Angular CLI App
Node version 14.17.0
Browser(s) Chrome 105.0.5195.102
Steps to reproduce Using the below model for menu with sub items:
...results in the below output.
Expected behaviour The parent AND it's children should not be even rendered to the DOM, let alone hidden.
StackBlitz https://stackblitz.com/edit/primeng-menu-visible-issue
Hi,
Cannot replicate the issue could you please provide a Stackblitz example by using https://stackblitz.com/github/primefaces/primeng-issue-template
Regards
Hi,
Cannot replicate the issue could you please provide a Stackblitz example by using https://stackblitz.com/github/primefaces/primeng-issue-template
Regards
Hi @cetincakiroglu
Yes - here is a StackBlitz. Did you test using PrimeNG 14.0.2?
https://stackblitz.com/edit/primeng-menu-visible-issue
I think also, the items that are not visible should not be rendered to the DOM.