UI: added passing of column into handleWidgetAction additionalParams of onCellClick for alarms table widget
This commit is contained in:
parent
28473f607b
commit
3c9e7b3d02
@ -83,7 +83,7 @@
|
||||
</mat-header-cell>
|
||||
<mat-cell *matCellDef="let alarm; let row = index"
|
||||
[ngStyle]="cellStyle(alarm, column, row)"
|
||||
(click)="onCellClick($event, alarm, $index)"
|
||||
(click)="onCellClick($event, alarm, column, $index)"
|
||||
[class.tb-pointer]="columnHasCellClick($index)">
|
||||
<span [innerHTML]="cellContent(alarm, column, row)"></span>
|
||||
<ng-container *ngIf="column.entityKey.key === 'assignee'">
|
||||
|
||||
@ -796,7 +796,7 @@ export class AlarmsTableWidgetComponent extends PageComponent implements OnInit,
|
||||
return res;
|
||||
}
|
||||
|
||||
public onCellClick($event: Event, alarm: AlarmDataInfo, columnIndex: number) {
|
||||
public onCellClick($event: Event, alarm: AlarmDataInfo, key: EntityColumn, columnIndex: number) {
|
||||
this.alarmsDatasource.toggleCurrentAlarm(alarm);
|
||||
const descriptors = this.ctx.actionsApi.getActionDescriptors('cellClick');
|
||||
let descriptor;
|
||||
@ -813,7 +813,7 @@ export class AlarmsTableWidgetComponent extends PageComponent implements OnInit,
|
||||
entityName = alarm.entityName;
|
||||
entityLabel = alarm.entityLabel;
|
||||
}
|
||||
this.ctx.actionsApi.handleWidgetAction($event, descriptor, entityId, entityName, {alarm}, entityLabel);
|
||||
this.ctx.actionsApi.handleWidgetAction($event, descriptor, entityId, entityName, {alarm, key}, entityLabel);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user