Update dashboard-layout.component.ts
This commit is contained in:
parent
f9cc85d5a8
commit
8924c5e209
@ -27,7 +27,7 @@ import {
|
|||||||
IDashboardComponent,
|
IDashboardComponent,
|
||||||
WidgetContextMenuItem
|
WidgetContextMenuItem
|
||||||
} from '@home/models/dashboard-component.models';
|
} from '@home/models/dashboard-component.models';
|
||||||
import { merge, Subscription } from 'rxjs';
|
import { Subscription } from 'rxjs';
|
||||||
import { Hotkey } from 'angular2-hotkeys';
|
import { Hotkey } from 'angular2-hotkeys';
|
||||||
import { TranslateService } from '@ngx-translate/core';
|
import { TranslateService } from '@ngx-translate/core';
|
||||||
import { ItemBufferService } from '@app/core/services/item-buffer.service';
|
import { ItemBufferService } from '@app/core/services/item-buffer.service';
|
||||||
@ -94,11 +94,8 @@ export class DashboardLayoutComponent extends PageComponent implements ILayoutCo
|
|||||||
}
|
}
|
||||||
|
|
||||||
ngOnInit(): void {
|
ngOnInit(): void {
|
||||||
const dashboardTimewindowChanged = [this.dashboard.dashboardTimewindowChanged];
|
const dashboardTimewindowChanged = this.parentDashboard ? this.parentDashboard.dashboardTimewindowChanged : this.dashboard.dashboardTimewindowChanged;
|
||||||
if (this.parentDashboard) {
|
this.rxSubscriptions.push(dashboardTimewindowChanged.subscribe(
|
||||||
dashboardTimewindowChanged.push(this.parentDashboard.dashboardTimewindowChanged);
|
|
||||||
}
|
|
||||||
this.rxSubscriptions.push(merge(...dashboardTimewindowChanged).subscribe(
|
|
||||||
(dashboardTimewindow) => {
|
(dashboardTimewindow) => {
|
||||||
this.dashboardCtx.dashboardTimewindow = dashboardTimewindow;
|
this.dashboardCtx.dashboardTimewindow = dashboardTimewindow;
|
||||||
this.dashboardCtx.runChangeDetection();
|
this.dashboardCtx.runChangeDetection();
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user