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">
|
||||
<mat-tab-group [ngClass]="{'tb-headless': historyOnly}"
|
||||
(selectedIndexChange)="timewindowForm.markAsDirty()" [(selectedIndex)]="timewindow.selectedTab"
|
||||
(selectedTabChange)="onTimewindowTypeChange()">
|
||||
(selectedTabChange)="onTimewindowTypeChange()" [(selectedIndex)]="timewindow.selectedTab">
|
||||
<mat-tab label="{{ 'timewindow.realtime' | translate }}">
|
||||
<section fxLayout="row">
|
||||
<section *ngIf="isEdit" fxLayout="column" fxLayoutAlign="start center"
|
||||
|
||||
@ -188,6 +188,7 @@ export class TimewindowPanelComponent extends PageComponent implements OnInit {
|
||||
}
|
||||
|
||||
onTimewindowTypeChange() {
|
||||
this.timewindowForm.markAsDirty();
|
||||
const timewindowFormValue = this.timewindowForm.getRawValue();
|
||||
if (this.timewindow.selectedTab === TimewindowType.REALTIME) {
|
||||
this.timewindowForm.get('realtime').patchValue({
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user