Skip to content

Commit

Permalink
Fixed primefaces#8337 Add separator option to the SplitButton
Browse files Browse the repository at this point in the history
  • Loading branch information
yigitfindikli committed Nov 19, 2019
1 parent 855872a commit aa28491
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/app/components/splitbutton/splitbutton.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,8 @@ import {RouterModule} from '@angular/router';
[@overlayAnimation]="{value: 'visible', params: {showTransitionParams: showTransitionOptions, hideTransitionParams: hideTransitionOptions}}" (@overlayAnimation.start)="onOverlayAnimationStart($event)">
<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">
<li *ngIf="item.separator" class="ui-menu-separator ui-widget-content" [ngClass]="{'ui-helper-hidden': item.visible === false}">
<li class="ui-menuitem ui-widget ui-corner-all" role="menuitem" *ngIf="item.visible !== false && !item.separator">
<a *ngIf="!item.routerLink" [attr.href]="item.url" 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>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -256,6 +256,7 @@ <h3>Dependencies</h3>
this.delete();
&#125;&#125;,
&#123;label: 'Angular.io', icon: 'pi pi-info', url: 'http://angular.io'&#125;,
&#123;separator:true&#125;,
&#123;label: 'Setup', icon: 'pi pi-cog', routerLink: ['/setup']&#125;
];
&#125;
Expand Down
1 change: 1 addition & 0 deletions src/app/showcase/components/splitbutton/splitbuttondemo.ts
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ export class SplitButtonDemo implements OnInit {
this.delete();
}},
{label: 'Angular.io', icon: 'pi pi-info', url: 'http://angular.io'},
{separator:true},
{label: 'Setup', icon: 'pi pi-cog', routerLink: ['/setup']}
];
}
Expand Down

0 comments on commit aa28491

Please sign in to comment.