Component: TabMenu - field visible #12823
Labels
Type: Bug
Issue contains a bug related to a specific component. Something about the component is not working
Milestone
Describe the bug
In the documentation the field visible of TabMenu -> TabMenuItem says:
Whether the dom element of menuitem is created or not.
But actually the menu item is "removed" by using a
display: none
called by.p-hidden
css class.I believe the correct behavior of this should be an ngif inside of the li tag and move the ngFor to be outside using a ng-container:
also because of this aproach, the p-hidden isn't working because another css class provide by the .p-tabmenuitem is aplying a display flex and the p-hidden is not an important css class.
src/app/components/tabmenu/tabmenu.css line 77.
src/app/components/common/common.css line 6.
I saw in the version 15.0.1 the bug was fixed by removing the
.p-tabmenuitem { display: flex; }
but i believe the correct fix should be using a ngif instead.Environment
Angular 15.1.0
Primeng 15.1.1
Reproducer
https://stackblitz.com/edit/github-xbqxur
Angular version
15.1.0
PrimeNG version
15.1.1
Build / Runtime
Angular CLI App
Language
TypeScript
Node version (for AoT issues node --version)
18.14.2
Browser(s)
Chrome 111, Firefox 108, Edge 111
Steps to reproduce the behavior
1 - Create a tabmenu and put some itens menus using the visible true or false
2 - Notice the menu-item with the visible false isn't remove from the DOM.
Expected behavior
the menu-item with the tag visible === false should be remove from the DOM.
The text was updated successfully, but these errors were encountered: