clean up
This commit is contained in:
parent
a2e0789a9c
commit
90157c1ee7
|
@ -27,11 +27,10 @@
|
|||
<fa-icon [icon]="faWindowCloseRegular"></fa-icon>
|
||||
</a>
|
||||
|
||||
<a href class="action-bar__link action-bar__link--more" (click)="onContextMenu($event, item)" title="More"
|
||||
[contextMenu]="basicMenu" [contextMenuSubject]="item">
|
||||
<fa-icon [icon]="faEllipsisH" [contextMenu]="basicMenu" [contextMenuSubject]="item"></fa-icon>
|
||||
<a href class="action-bar__link action-bar__link--more" (click)="onContextMenu($event)" title="More">
|
||||
<fa-icon [icon]="faEllipsisH"></fa-icon>
|
||||
</a>
|
||||
<context-menu #basicMenu>
|
||||
<context-menu #contextMenu>
|
||||
<ng-template contextMenuItem (execute)="expandStatus()">
|
||||
Expand status
|
||||
</ng-template>
|
||||
|
|
|
@ -28,7 +28,7 @@ export class ActionBarComponent implements OnInit, OnDestroy {
|
|||
faEllipsisH = faEllipsisH;
|
||||
faLock = faLock;
|
||||
|
||||
@ViewChild(ContextMenuComponent) public basicMenu: ContextMenuComponent;
|
||||
@ViewChild(ContextMenuComponent) public contextMenu: ContextMenuComponent;
|
||||
public items = [
|
||||
{ name: 'John', otherProperty: 'Foo' },
|
||||
{ name: 'Joe', otherProperty: 'Bar' }
|
||||
|
@ -241,12 +241,12 @@ export class ActionBarComponent implements OnInit, OnDestroy {
|
|||
return false;
|
||||
}
|
||||
|
||||
public onContextMenu($event: MouseEvent, item: any): void {
|
||||
public onContextMenu($event: MouseEvent): void {
|
||||
this.contextMenuService.show.next({
|
||||
// Optional - if unspecified, all context menu components will open
|
||||
contextMenu: this.basicMenu,
|
||||
contextMenu: this.contextMenu,
|
||||
event: $event,
|
||||
item: item,
|
||||
item: null
|
||||
});
|
||||
$event.preventDefault();
|
||||
$event.stopPropagation();
|
||||
|
|
Loading…
Reference in New Issue