Browse Source

UI: Refactoring

pull/5772/head
ArtemDzhereleiko 5 years ago
parent
commit
94d502e6ee
  1. 2
      ui-ngx/src/app/modules/home/components/widget/widget-config.component.ts

2
ui-ngx/src/app/modules/home/components/widget/widget-config.component.ts

@ -324,7 +324,6 @@ export class WidgetConfigComponent extends PageComponent implements OnInit, Cont
this.datasourceTypes.push(DatasourceType.entityCount);
}
}
this.showLegendFieldset = (this.widgetType === widgetType.timeseries || this.widgetType === widgetType.latest);
this.dataSettings = this.fb.group({});
this.targetDeviceSettings = this.fb.group({});
@ -389,6 +388,7 @@ export class WidgetConfigComponent extends PageComponent implements OnInit, Cont
if (this.modelValue) {
if (this.widgetType !== this.modelValue.widgetType) {
this.widgetType = this.modelValue.widgetType;
this.showLegendFieldset = (this.widgetType === widgetType.timeseries || this.widgetType === widgetType.latest);
this.buildForms();
}
const config = this.modelValue.config;

Loading…
Cancel
Save