Merge pull request #6909 from ChantsovaEkaterina/bug/state-widget-dashboard-timewindow-binding

[3.4] UI: Fix binding to dashboard timewindow for timeseries widgets used within state widget
This commit is contained in:
Igor Kulikov 2022-07-08 18:46:56 +03:00 committed by GitHub
commit c7abccd29e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -94,7 +94,8 @@ export class DashboardLayoutComponent extends PageComponent implements ILayoutCo
}
ngOnInit(): void {
this.rxSubscriptions.push(this.dashboard.dashboardTimewindowChanged.subscribe(
const dashboardTimewindowChanged = this.parentDashboard ? this.parentDashboard.dashboardTimewindowChanged : this.dashboard.dashboardTimewindowChanged;
this.rxSubscriptions.push(dashboardTimewindowChanged.subscribe(
(dashboardTimewindow) => {
this.dashboardCtx.dashboardTimewindow = dashboardTimewindow;
this.dashboardCtx.runChangeDetection();