From a7dbb4cc6428333b5f67e7eb1f1b2fb0581378d5 Mon Sep 17 00:00:00 2001 From: Vladyslav_Prykhodko Date: Mon, 16 Dec 2024 17:00:49 +0200 Subject: [PATCH] UI: Fixed incorrect apply timewindows after cancel edit dashboard --- .../home/components/widget/widget-container.component.html | 5 +++-- .../app/modules/home/components/widget/widget.component.ts | 6 +++--- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/ui-ngx/src/app/modules/home/components/widget/widget-container.component.html b/ui-ngx/src/app/modules/home/components/widget/widget-container.component.html index f6679d0c94..2db2717cb8 100644 --- a/ui-ngx/src/app/modules/home/components/widget/widget-container.component.html +++ b/ui-ngx/src/app/modules/home/components/widget/widget-container.component.html @@ -66,6 +66,7 @@
diff --git a/ui-ngx/src/app/modules/home/components/widget/widget.component.ts b/ui-ngx/src/app/modules/home/components/widget/widget.component.ts index d1517a2e72..eaf6b6105e 100644 --- a/ui-ngx/src/app/modules/home/components/widget/widget.component.ts +++ b/ui-ngx/src/app/modules/home/components/widget/widget.component.ts @@ -150,9 +150,11 @@ export class WidgetComponent extends PageComponent implements OnInit, OnChanges, @Input() dashboardWidget: DashboardWidget; + @Input() + widget: Widget; + @ViewChild('widgetContent', {read: ViewContainerRef, static: true}) widgetContentContainer: ViewContainerRef; - widget: Widget; widgetInfo: WidgetInfo; errorMessages: string[]; widgetContext: WidgetContext; @@ -223,8 +225,6 @@ export class WidgetComponent extends PageComponent implements OnInit, OnChanges, this.loadingData = true; - this.widget = this.dashboardWidget.widget; - const actionDescriptorsBySourceId: {[actionSourceId: string]: Array} = {}; if (this.widget.config.actions) { for (const actionSourceId of Object.keys(this.widget.config.actions)) {