UI: Fixed incorrect apply timewindows after cancel edit dashboard
This commit is contained in:
parent
72ae3078f8
commit
a7dbb4cc64
@ -66,6 +66,7 @@
|
||||
<div class="tb-widget-content" [class.tb-no-interaction]="disableWidgetInteraction">
|
||||
<tb-widget #widgetComponent
|
||||
[dashboardWidget]="widget"
|
||||
[widget]="widget.widget"
|
||||
[isEdit]="isEdit"
|
||||
[isPreview]="isPreview"
|
||||
[isMobile]="isMobile"
|
||||
@ -96,8 +97,8 @@
|
||||
noMargin
|
||||
noPadding
|
||||
[isEdit]="isEdit"
|
||||
[timewindowStyle]="widgetComponent.widget.config.timewindowStyle"
|
||||
[(ngModel)]="widgetComponent.widget.config.timewindow"
|
||||
[timewindowStyle]="widget.widget.config.timewindowStyle"
|
||||
[(ngModel)]="widget.widget.config.timewindow"
|
||||
(ngModelChange)="widgetComponent.onTimewindowChanged($event)">
|
||||
</tb-timewindow>
|
||||
</div>
|
||||
|
||||
@ -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<WidgetActionDescriptor>} = {};
|
||||
if (this.widget.config.actions) {
|
||||
for (const actionSourceId of Object.keys(this.widget.config.actions)) {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user