[ACA-3000][ACA-2999] FE - Provide way to show ContextMenu on Task/Process list (#5596)

* [ACA-3000] FE - Provide way to show ContextMenu on Task list

* * Updated docs

* * Added unit tests to the recent changes
This commit is contained in:
siva kumar
2020-04-14 14:22:57 +05:30
committed by GitHub
parent ecca9220f1
commit 63063699fd
13 changed files with 394 additions and 11 deletions

View File

@@ -18,7 +18,7 @@
import {
DataRowEvent, DataTableAdapter, DataTableSchema, CustomEmptyContentTemplateDirective, CustomLoadingContentTemplateDirective,
AppConfigService, PaginationComponent, PaginatedComponent,
UserPreferencesService, UserPreferenceValues, PaginationModel } from '@alfresco/adf-core';
UserPreferencesService, UserPreferenceValues, PaginationModel, DataCellEvent } from '@alfresco/adf-core';
import {
AfterContentInit, Component, ContentChild, EventEmitter,
Input, OnChanges, Output, SimpleChanges, OnDestroy, OnInit } from '@angular/core';
@@ -123,6 +123,14 @@ export class TaskListComponent extends DataTableSchema implements OnChanges, Aft
@Input()
start: number;
/** Toggles custom context menu for the component. */
@Input()
showContextMenu: boolean = false;
/** Emitted before the context menu is displayed for a row. */
@Output()
showRowContextMenu = new EventEmitter<DataCellEvent>();
/** Emitted when a task in the list is clicked */
@Output()
rowClick = new EventEmitter<string>();
@@ -356,6 +364,10 @@ export class TaskListComponent extends DataTableSchema implements OnChanges, Aft
}
}
onShowRowContextMenu(event: DataCellEvent) {
this.showRowContextMenu.emit(event);
}
/**
* Optimize name field
* @param instances