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() @Input()
set deviceProfileId(value: string) { set deviceProfileId(value: string) {
this.deviceProfile = value; if (this.deviceProfile !== value) {
const packageId = this.otaPackageFormGroup.get('packageId').value; if (this.deviceProfile) {
if (packageId && isNotEmptyStr(packageId)) { this.reset();
this.reset(); }
} else { this.deviceProfile = value;
this.cleanFilteredPackages.next([]);
} }
} }

Loading…
Cancel
Save