Merge pull request #5102 from ArtemDzhereleiko/bug-fix/no-entity-label/dashboard-state

[3.3.2] Fix bug no entity label for dashboard state
This commit is contained in:
Igor Kulikov 2021-08-31 15:41:42 +03:00 committed by GitHub
commit f0b7ac7f35
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -149,7 +149,8 @@ export class EntitiesHierarchyWidgetComponent extends PageComponent implements O
entityType: EntityType.DEVICE,
id: '123'
},
name: 'TEST DEV1'
name: 'TEST DEV1',
label: ''
},
data: {},
level: 2
@ -289,7 +290,7 @@ export class EntitiesHierarchyWidgetComponent extends PageComponent implements O
const descriptors = this.ctx.actionsApi.getActionDescriptors('nodeSelected');
if (descriptors.length) {
const entity = selectedNode.data.nodeCtx.entity;
this.ctx.actionsApi.handleWidgetAction(event, descriptors[0], entity.id, entity.name, { nodeCtx: selectedNode.data.nodeCtx });
this.ctx.actionsApi.handleWidgetAction(event, descriptors[0], entity.id, entity.name,{ nodeCtx: selectedNode.data.nodeCtx }, entity.label);
}
}
}