Skip to content

Commit

Permalink
Merge pull request #15441 from f94e59/master
Browse files Browse the repository at this point in the history
fix 13929 tieredMenuSub not posititioning itself within viewport
  • Loading branch information
cetincakiroglu authored May 3, 2024
2 parents 6efc4ed + ceef21a commit 34e0c9e
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/app/components/tieredmenu/tieredmenu.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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;

Expand Down

0 comments on commit 34e0c9e

Please sign in to comment.