Skip to content

Commit

Permalink
fixed primefaces#6822 SplitButton & TieredMenu - double click on item…
Browse files Browse the repository at this point in the history
… reloads the page
  • Loading branch information
yigitfindikli authored and darkhelmet committed Mar 25, 2019
1 parent d68f459 commit 0cb87a7
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 2 deletions.
4 changes: 4 additions & 0 deletions src/app/components/splitbutton/splitbutton.css
Original file line number Diff line number Diff line change
Expand Up @@ -23,4 +23,8 @@

.ui-fluid .ui-splitbutton .ui-button.ui-splitbutton-menubutton {
width: 2em;
}

.ui-splitbutton .ui-menuitem-link {
cursor: pointer;
}
2 changes: 1 addition & 1 deletion src/app/components/splitbutton/splitbutton.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ import {RouterModule} from '@angular/router';
<ul class="ui-menu-list ui-helper-reset">
<ng-template ngFor let-item [ngForOf]="model">
<li class="ui-menuitem ui-widget ui-corner-all" role="menuitem" *ngIf="item.visible !== false">
<a *ngIf="!item.routerLink" [href]="item.url||'#'" class="ui-menuitem-link ui-corner-all" [attr.target]="item.target"
<a *ngIf="!item.routerLink" [attr.href]="item.url||null" class="ui-menuitem-link ui-corner-all" [attr.target]="item.target"
[ngClass]="{'ui-state-disabled':item.disabled}" (click)="itemClick($event, item)">
<span [ngClass]="'ui-menuitem-icon'" [class]="item.icon" *ngIf="item.icon"></span>
<span class="ui-menuitem-text">{{item.label}}</span>
Expand Down
1 change: 1 addition & 0 deletions src/app/components/tieredmenu/tieredmenu.css
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@
}

.ui-tieredmenu .ui-menuitem-link {
cursor: pointer;
padding: .25em;
display: block;
position: relative;
Expand Down
2 changes: 1 addition & 1 deletion src/app/components/tieredmenu/tieredmenu.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ import {RouterModule} from '@angular/router';
<li *ngIf="!child.separator" #listItem [ngClass]="{'ui-menuitem ui-widget ui-corner-all':true,'ui-menuitem-active':listItem==activeItem,'ui-helper-hidden': child.visible === false}"
[class]="child.styleClass" [ngStyle]="child.style"
(mouseenter)="onItemMouseEnter($event, listItem, child)" (mouseleave)="onItemMouseLeave($event)">
<a *ngIf="!child.routerLink" [href]="child.url||'#'" class="ui-menuitem-link ui-corner-all" [attr.target]="child.target" [attr.title]="child.title" [attr.id]="child.id"
<a *ngIf="!child.routerLink" [attr.href]="child.url||null" class="ui-menuitem-link ui-corner-all" [attr.target]="child.target" [attr.title]="child.title" [attr.id]="child.id"
[ngClass]="{'ui-state-disabled':child.disabled}" (click)="itemClick($event, child)">
<span class="ui-menuitem-icon" *ngIf="child.icon" [ngClass]="child.icon"></span>
<span class="ui-menuitem-text">{{child.label}}</span>
Expand Down

0 comments on commit 0cb87a7

Please sign in to comment.