Merge pull request #8965 from ArtemDzhereleiko/AD/bug-fix/entity-select
Fixed entity select component for alias dialog component
This commit is contained in:
commit
ed736984ce
@ -122,20 +122,18 @@ export class EntitySelectComponent implements ControlValueAccessor, OnInit, Afte
|
||||
|
||||
writeValue(value: EntityId | null): void {
|
||||
if (value != null) {
|
||||
if (value.id === NULL_UUID) {
|
||||
value.id = null;
|
||||
}
|
||||
this.modelValue = value;
|
||||
this.entitySelectFormGroup.get('entityType').patchValue(value.entityType, {emitEvent: true});
|
||||
this.entitySelectFormGroup.get('entityId').patchValue(value, {emitEvent: true});
|
||||
this.modelValue = {
|
||||
entityType: value.entityType,
|
||||
id: value.id !== NULL_UUID ? value.id : null
|
||||
};
|
||||
} else {
|
||||
this.modelValue = {
|
||||
entityType: this.defaultEntityType,
|
||||
id: null
|
||||
};
|
||||
this.entitySelectFormGroup.get('entityType').patchValue(this.defaultEntityType, {emitEvent: true});
|
||||
this.entitySelectFormGroup.get('entityId').patchValue(null, {emitEvent: true});
|
||||
}
|
||||
this.entitySelectFormGroup.get('entityType').patchValue(this.modelValue.entityType, {emitEvent: false});
|
||||
this.entitySelectFormGroup.get('entityId').patchValue(this.modelValue.id, {emitEvent: false});
|
||||
}
|
||||
|
||||
updateView(entityType: EntityType | AliasEntityType | null, entityId: string | null) {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user