Merge pull request #9172 from rusikv/bug/pie-flot-widget-on-slice-click
Fix for pie flot widget slice click action
This commit is contained in:
commit
17bd83d0c5
@ -1621,10 +1621,10 @@ export class TbFlot {
|
|||||||
const descriptors = this.ctx.actionsApi.getActionDescriptors('sliceClick');
|
const descriptors = this.ctx.actionsApi.getActionDescriptors('sliceClick');
|
||||||
if ($event && descriptors.length) {
|
if ($event && descriptors.length) {
|
||||||
$event.stopPropagation();
|
$event.stopPropagation();
|
||||||
const entityInfo = this.ctx.actionsApi.getActiveEntityInfo();
|
const datasource = item.series.datasource;
|
||||||
const entityId = entityInfo ? entityInfo.entityId : null;
|
const entityId = datasource ? datasource.entity?.id : null;
|
||||||
const entityName = entityInfo ? entityInfo.entityName : null;
|
const entityName = datasource ? datasource.entityName : null;
|
||||||
const entityLabel = entityInfo ? entityInfo.entityLabel : null;
|
const entityLabel = datasource ? datasource.entityLabel : null;
|
||||||
this.ctx.actionsApi.handleWidgetAction($event, descriptors[0], entityId, entityName, item, entityLabel);
|
this.ctx.actionsApi.handleWidgetAction($event, descriptors[0], entityId, entityName, item, entityLabel);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user