Browse Source

refactoring for ota package input

pull/9923/head
Dmitriymush 3 years ago
parent
commit
a359d4a4b1
  1. 11
      ui-ngx/src/app/shared/components/ota-package/ota-package-autocomplete.component.ts

11
ui-ngx/src/app/shared/components/ota-package/ota-package-autocomplete.component.ts

@ -72,12 +72,11 @@ export class OtaPackageAutocompleteComponent implements ControlValueAccessor, On
@Input()
set deviceProfileId(value: string) {
this.deviceProfile = value;
const packageId = this.otaPackageFormGroup.get('packageId').value;
if (packageId && isNotEmptyStr(packageId)) {
this.reset();
} else {
this.cleanFilteredPackages.next([]);
if (this.deviceProfile !== value) {
if (this.deviceProfile) {
this.reset();
}
this.deviceProfile = value;
}
}

Loading…
Cancel
Save