Skip to content

Commit 7bbdc9c

Browse files
mohas22mohas22
authored andcommitted
updated userreference based on comment
1 parent 402fa1e commit 7bbdc9c

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

packages/angular-sdk-components/src/lib/_components/field/user-reference/user-reference.component.ts

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -168,7 +168,11 @@ export class UserReferenceComponent implements OnInit, OnDestroy {
168168
this.placeholder = placeholder || '';
169169
this.displayMode$ = displayMode;
170170

171-
this.value$ = value && typeof value === 'object' && value.userName ? value.userName : '';
171+
if (value && typeof value === 'object') {
172+
this.value$ = value.userName ? value.userName : '';
173+
} else {
174+
this.value$ = value || '';
175+
}
172176

173177
const { readOnly, required } = props;
174178
[this.bReadonly$, this.bRequired$] = [readOnly, required].map(prop => prop === true || (typeof prop === 'string' && prop === 'true'));

0 commit comments

Comments
 (0)