diff --git a/ui-ngx/src/app/modules/home/components/profile/device-profile.component.html b/ui-ngx/src/app/modules/home/components/profile/device-profile.component.html
index 135d643025..5789e97705 100644
--- a/ui-ngx/src/app/modules/home/components/profile/device-profile.component.html
+++ b/ui-ngx/src/app/modules/home/components/profile/device-profile.component.html
@@ -50,7 +50,7 @@
diff --git a/ui-ngx/src/app/shared/components/entity/entity-autocomplete.component.ts b/ui-ngx/src/app/shared/components/entity/entity-autocomplete.component.ts
index 52c0df2a8c..27c156790b 100644
--- a/ui-ngx/src/app/shared/components/entity/entity-autocomplete.component.ts
+++ b/ui-ngx/src/app/shared/components/entity/entity-autocomplete.component.ts
@@ -77,6 +77,12 @@ export class EntityAutocompleteComponent implements ControlValueAccessor, OnInit
@Input()
excludeEntityIds: Array;
+ @Input()
+ labelText: string;
+
+ @Input()
+ requiredText: string;
+
private requiredValue: boolean;
get required(): boolean {
return this.requiredValue;
@@ -89,21 +95,6 @@ export class EntityAutocompleteComponent implements ControlValueAccessor, OnInit
@Input()
disabled: boolean;
- labelValue: string;
-
- @Input()
- set label(label: string) {
- this.labelValue = label;
- this.entityText = label;
- }
-
- requiredTextValue: string;
-
- @Input()
- set requiredText(requiredText: string) {
- this.requiredTextValue = requiredText;
- }
-
@ViewChild('entityInput', {static: true}) entityInput: ElementRef;
entityText: string;
@@ -227,13 +218,12 @@ export class EntityAutocompleteComponent implements ControlValueAccessor, OnInit
break;
}
}
- if (this.labelValue) {
- this.entityText = this.labelValue;
+ if (this.labelText && this.labelText.length) {
+ this.entityText = this.labelText;
}
- if (this.requiredTextValue) {
- this.entityRequiredText = this.requiredTextValue;
+ if (this.requiredText && this.requiredText.length) {
+ this.entityRequiredText = this.requiredText;
}
-
const currentEntity = this.getCurrentEntity();
if (currentEntity) {
const currentEntityType = currentEntity.id.entityType;