UI: Revert code onRowClick function in table
This commit is contained in:
parent
a0623e8e86
commit
095e8913ac
@ -720,12 +720,12 @@ export class AlarmsTableWidgetComponent extends PageComponent implements OnInit,
|
|||||||
}
|
}
|
||||||
|
|
||||||
public onRowClick($event: Event, alarm: AlarmDataInfo) {
|
public onRowClick($event: Event, alarm: AlarmDataInfo) {
|
||||||
|
if ($event) {
|
||||||
|
$event.stopPropagation();
|
||||||
|
}
|
||||||
|
this.alarmsDatasource.toggleCurrentAlarm(alarm);
|
||||||
const descriptors = this.ctx.actionsApi.getActionDescriptors('rowClick');
|
const descriptors = this.ctx.actionsApi.getActionDescriptors('rowClick');
|
||||||
if (descriptors.length) {
|
if (descriptors.length) {
|
||||||
if ($event) {
|
|
||||||
$event.stopPropagation();
|
|
||||||
}
|
|
||||||
this.alarmsDatasource.toggleCurrentAlarm(alarm);
|
|
||||||
let entityId;
|
let entityId;
|
||||||
let entityName;
|
let entityName;
|
||||||
if (alarm && alarm.originator) {
|
if (alarm && alarm.originator) {
|
||||||
|
|||||||
@ -661,13 +661,13 @@ export class EntitiesTableWidgetComponent extends PageComponent implements OnIni
|
|||||||
}
|
}
|
||||||
|
|
||||||
public onRowClick($event: Event, entity: EntityData, isDouble?: boolean) {
|
public onRowClick($event: Event, entity: EntityData, isDouble?: boolean) {
|
||||||
|
if ($event) {
|
||||||
|
$event.stopPropagation();
|
||||||
|
}
|
||||||
|
this.entityDatasource.toggleCurrentEntity(entity);
|
||||||
const actionSourceId = isDouble ? 'rowDoubleClick' : 'rowClick';
|
const actionSourceId = isDouble ? 'rowDoubleClick' : 'rowClick';
|
||||||
const descriptors = this.ctx.actionsApi.getActionDescriptors(actionSourceId);
|
const descriptors = this.ctx.actionsApi.getActionDescriptors(actionSourceId);
|
||||||
if (descriptors.length) {
|
if (descriptors.length) {
|
||||||
if ($event) {
|
|
||||||
$event.stopPropagation();
|
|
||||||
}
|
|
||||||
this.entityDatasource.toggleCurrentEntity(entity);
|
|
||||||
let entityId;
|
let entityId;
|
||||||
let entityName;
|
let entityName;
|
||||||
let entityLabel;
|
let entityLabel;
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user