UI: Fixed display columns without sources
This commit is contained in:
parent
dd900dafba
commit
9fceba291c
@ -388,9 +388,11 @@ export class TimeseriesTableWidgetComponent extends PageComponent implements OnI
|
|||||||
this.sources.push(source);
|
this.sources.push(source);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
if (this.sources.length) {
|
||||||
this.prepareDisplayedColumn();
|
this.prepareDisplayedColumn();
|
||||||
this.sources[this.sourceIndex].displayedColumns =
|
this.sources[this.sourceIndex].displayedColumns =
|
||||||
this.displayedColumns[this.sourceIndex].filter(value => value.display).map(value => value.def);
|
this.displayedColumns[this.sourceIndex].filter(value => value.display).map(value => value.def);
|
||||||
|
}
|
||||||
this.updateActiveEntityInfo();
|
this.updateActiveEntityInfo();
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -398,6 +400,7 @@ export class TimeseriesTableWidgetComponent extends PageComponent implements OnI
|
|||||||
if ($event) {
|
if ($event) {
|
||||||
$event.stopPropagation();
|
$event.stopPropagation();
|
||||||
}
|
}
|
||||||
|
if (this.sources.length) {
|
||||||
const target = $event.target || $event.currentTarget;
|
const target = $event.target || $event.currentTarget;
|
||||||
const config = new OverlayConfig();
|
const config = new OverlayConfig();
|
||||||
config.backdropClass = 'cdk-overlay-transparent-backdrop';
|
config.backdropClass = 'cdk-overlay-transparent-backdrop';
|
||||||
@ -441,6 +444,7 @@ export class TimeseriesTableWidgetComponent extends PageComponent implements OnI
|
|||||||
this.viewContainerRef, injector));
|
this.viewContainerRef, injector));
|
||||||
this.ctx.detectChanges();
|
this.ctx.detectChanges();
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
private prepareDisplayedColumn() {
|
private prepareDisplayedColumn() {
|
||||||
if (!this.displayedColumns[this.sourceIndex]) {
|
if (!this.displayedColumns[this.sourceIndex]) {
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user