UI: refactoring

This commit is contained in:
Artem Dzhereleiko 2023-07-05 16:36:36 +03:00
parent 7f555fa747
commit 4eca0bd9af

View File

@ -14,13 +14,13 @@
/// limitations under the License. /// limitations under the License.
/// ///
import { Component, forwardRef, Input, OnDestroy, OnInit } from '@angular/core'; import { Component, forwardRef, Input, OnInit } from '@angular/core';
import { import {
ControlValueAccessor, ControlValueAccessor,
UntypedFormBuilder,
UntypedFormGroup,
NG_VALIDATORS, NG_VALIDATORS,
NG_VALUE_ACCESSOR, NG_VALUE_ACCESSOR,
UntypedFormBuilder,
UntypedFormGroup,
ValidationErrors, ValidationErrors,
Validator, Validator,
Validators Validators
@ -30,7 +30,6 @@ import { AppState } from '@app/core/core.state';
import { coerceBooleanProperty } from '@angular/cdk/coercion'; import { coerceBooleanProperty } from '@angular/cdk/coercion';
import { DeviceTransportConfiguration, DeviceTransportType } from '@shared/models/device.models'; import { DeviceTransportConfiguration, DeviceTransportType } from '@shared/models/device.models';
import { deepClone } from '@core/utils'; import { deepClone } from '@core/utils';
import { Subscription } from 'rxjs';
@Component({ @Component({
selector: 'tb-device-transport-configuration', selector: 'tb-device-transport-configuration',
@ -105,9 +104,7 @@ export class DeviceTransportConfigurationComponent implements ControlValueAccess
if (configuration) { if (configuration) {
delete configuration.type; delete configuration.type;
} }
// setTimeout(() => {
this.deviceTransportConfigurationFormGroup.patchValue({configuration}, {emitEvent: false}); this.deviceTransportConfigurationFormGroup.patchValue({configuration}, {emitEvent: false});
// }, 0);
} }
validate(): ValidationErrors | null { validate(): ValidationErrors | null {