Skip to content

Commit

Permalink
Fixed #11049 - RouterLink CtrlKey support
Browse files Browse the repository at this point in the history
  • Loading branch information
yigitfindikli committed Jan 12, 2022
1 parent 74aa40c commit e8d3ef9
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/app/components/megamenu/megamenu.ts
Original file line number Diff line number Diff line change
Expand Up @@ -146,7 +146,7 @@ export class MegaMenu implements AfterContentInit {
return;
}

if (!item.url) {
if (!item.url && !item.routerLink) {
event.preventDefault();
}

Expand Down
2 changes: 1 addition & 1 deletion src/app/components/steps/steps.ts
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ export class Steps implements OnInit, OnDestroy {

this.activeIndexChange.emit(i);

if (!item.url) {
if (!item.url && !item.routerLink) {
event.preventDefault();
}

Expand Down
6 changes: 5 additions & 1 deletion src/app/components/tabmenu/tabmenu.ts
Original file line number Diff line number Diff line change
Expand Up @@ -105,12 +105,16 @@ export class TabMenu implements AfterContentInit,AfterViewInit,AfterViewChecked
return item === this.activeItem;
}

itemClick(event: Event, item: MenuItem) {
itemClick(event: Event, item: MenuItem) {
if (item.disabled) {
event.preventDefault();
return;
}

if (!item.url && !item.routerLink) {
event.preventDefault();
}

if (item.command) {
item.command({
originalEvent: event,
Expand Down

0 comments on commit e8d3ef9

Please sign in to comment.