diff --git a/src/app/components/tieredmenu/tieredmenu.ts b/src/app/components/tieredmenu/tieredmenu.ts index 548643c6a21..7a6c55d147e 100755 --- a/src/app/components/tieredmenu/tieredmenu.ts +++ b/src/app/components/tieredmenu/tieredmenu.ts @@ -192,7 +192,7 @@ import { ObjectUtils, UniqueComponentId, ZIndexUtils } from 'primeng/utils'; class: 'p-element' } }) -export class TieredMenuSub { +export class TieredMenuSub implements AfterContentInit { @Input() items: any[]; @Input() itemTemplate: HTMLElement | undefined; @@ -235,6 +235,10 @@ export class TieredMenuSub { constructor(public el: ElementRef, public renderer: Renderer2, @Inject(forwardRef(() => TieredMenu)) public tieredMenu: TieredMenu) {} + ngAfterContentInit(): void { + this.positionSubmenu(); + } + positionSubmenu() { const sublist = this.sublistViewChild && this.sublistViewChild.nativeElement;