diff --git a/ui-ngx/src/app/shared/components/ota-package/ota-package-autocomplete.component.ts b/ui-ngx/src/app/shared/components/ota-package/ota-package-autocomplete.component.ts index 1de427901c..20610cd6d0 100644 --- a/ui-ngx/src/app/shared/components/ota-package/ota-package-autocomplete.component.ts +++ b/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; } }