Browse Source

UI: Fix for slice click action taking wrong entity to state params

pull/9172/head
rusikv 3 years ago
parent
commit
228354d3b8
  1. 8
      ui-ngx/src/app/modules/home/components/widget/lib/flot-widget.ts

8
ui-ngx/src/app/modules/home/components/widget/lib/flot-widget.ts

@ -1621,10 +1621,10 @@ export class TbFlot {
const descriptors = this.ctx.actionsApi.getActionDescriptors('sliceClick');
if ($event && descriptors.length) {
$event.stopPropagation();
const entityInfo = this.ctx.actionsApi.getActiveEntityInfo();
const entityId = entityInfo ? entityInfo.entityId : null;
const entityName = entityInfo ? entityInfo.entityName : null;
const entityLabel = entityInfo ? entityInfo.entityLabel : null;
const datasource = item.series.datasource;
const entityId = datasource ? datasource.entity?.id : null;
const entityName = datasource ? datasource.entityName : null;
const entityLabel = datasource ? datasource.entityLabel : null;
this.ctx.actionsApi.handleWidgetAction($event, descriptors[0], entityId, entityName, item, entityLabel);
}
}

Loading…
Cancel
Save