Browse Source

UI: Revert code onRowClick function in table

pull/4732/head
Vladyslav_Prykhodko 5 years ago
parent
commit
095e8913ac
  1. 8
      ui-ngx/src/app/modules/home/components/widget/lib/alarms-table-widget.component.ts
  2. 8
      ui-ngx/src/app/modules/home/components/widget/lib/entities-table-widget.component.ts

8
ui-ngx/src/app/modules/home/components/widget/lib/alarms-table-widget.component.ts

@ -720,12 +720,12 @@ export class AlarmsTableWidgetComponent extends PageComponent implements OnInit,
}
public onRowClick($event: Event, alarm: AlarmDataInfo) {
if ($event) {
$event.stopPropagation();
}
this.alarmsDatasource.toggleCurrentAlarm(alarm);
const descriptors = this.ctx.actionsApi.getActionDescriptors('rowClick');
if (descriptors.length) {
if ($event) {
$event.stopPropagation();
}
this.alarmsDatasource.toggleCurrentAlarm(alarm);
let entityId;
let entityName;
if (alarm && alarm.originator) {

8
ui-ngx/src/app/modules/home/components/widget/lib/entities-table-widget.component.ts

@ -661,13 +661,13 @@ export class EntitiesTableWidgetComponent extends PageComponent implements OnIni
}
public onRowClick($event: Event, entity: EntityData, isDouble?: boolean) {
if ($event) {
$event.stopPropagation();
}
this.entityDatasource.toggleCurrentEntity(entity);
const actionSourceId = isDouble ? 'rowDoubleClick' : 'rowClick';
const descriptors = this.ctx.actionsApi.getActionDescriptors(actionSourceId);
if (descriptors.length) {
if ($event) {
$event.stopPropagation();
}
this.entityDatasource.toggleCurrentEntity(entity);
let entityId;
let entityName;
let entityLabel;

Loading…
Cancel
Save