UI: combined logic of indexchanged and tabchanged event handlers of timewindow panel
This commit is contained in:
parent
a21ce12528
commit
1b93dc7666
@ -17,8 +17,7 @@
|
|||||||
-->
|
-->
|
||||||
<form [formGroup]="timewindowForm" class="mat-content">
|
<form [formGroup]="timewindowForm" class="mat-content">
|
||||||
<mat-tab-group [ngClass]="{'tb-headless': historyOnly}"
|
<mat-tab-group [ngClass]="{'tb-headless': historyOnly}"
|
||||||
(selectedIndexChange)="timewindowForm.markAsDirty()" [(selectedIndex)]="timewindow.selectedTab"
|
(selectedTabChange)="onTimewindowTypeChange()" [(selectedIndex)]="timewindow.selectedTab">
|
||||||
(selectedTabChange)="onTimewindowTypeChange()">
|
|
||||||
<mat-tab label="{{ 'timewindow.realtime' | translate }}">
|
<mat-tab label="{{ 'timewindow.realtime' | translate }}">
|
||||||
<section fxLayout="row">
|
<section fxLayout="row">
|
||||||
<section *ngIf="isEdit" fxLayout="column" fxLayoutAlign="start center"
|
<section *ngIf="isEdit" fxLayout="column" fxLayoutAlign="start center"
|
||||||
|
|||||||
@ -188,6 +188,7 @@ export class TimewindowPanelComponent extends PageComponent implements OnInit {
|
|||||||
}
|
}
|
||||||
|
|
||||||
onTimewindowTypeChange() {
|
onTimewindowTypeChange() {
|
||||||
|
this.timewindowForm.markAsDirty();
|
||||||
const timewindowFormValue = this.timewindowForm.getRawValue();
|
const timewindowFormValue = this.timewindowForm.getRawValue();
|
||||||
if (this.timewindow.selectedTab === TimewindowType.REALTIME) {
|
if (this.timewindow.selectedTab === TimewindowType.REALTIME) {
|
||||||
this.timewindowForm.get('realtime').patchValue({
|
this.timewindowForm.get('realtime').patchValue({
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user