mirror of
https://github.com/zitadel/zitadel.git
synced 2025-04-23 08:11:33 +00:00
fix: user autocomplete emitter (#876)
This commit is contained in:
parent
f8616265be
commit
84b212bd75
@ -118,8 +118,12 @@ export class SearchUserAutocompleteComponent {
|
|||||||
} else {
|
} else {
|
||||||
this.users = [this.filteredUsers[index]];
|
this.users = [this.filteredUsers[index]];
|
||||||
}
|
}
|
||||||
this.selectionChanged.emit(this.users);
|
|
||||||
|
|
||||||
|
if (this.singleOutput) {
|
||||||
|
this.selectionChanged.emit(this.users[0]);
|
||||||
|
} else {
|
||||||
|
this.selectionChanged.emit(this.users);
|
||||||
|
}
|
||||||
this.usernameInput.nativeElement.value = '';
|
this.usernameInput.nativeElement.value = '';
|
||||||
this.myControl.setValue(null);
|
this.myControl.setValue(null);
|
||||||
}
|
}
|
||||||
@ -140,7 +144,11 @@ export class SearchUserAutocompleteComponent {
|
|||||||
public getGlobalUser(): void {
|
public getGlobalUser(): void {
|
||||||
this.userService.GetUserByLoginNameGlobal(this.globalLoginNameControl.value).then(user => {
|
this.userService.GetUserByLoginNameGlobal(this.globalLoginNameControl.value).then(user => {
|
||||||
this.users = [user.toObject()];
|
this.users = [user.toObject()];
|
||||||
|
if (this.singleOutput) {
|
||||||
|
this.selectionChanged.emit(this.users[0]);
|
||||||
|
} else {
|
||||||
this.selectionChanged.emit(this.users);
|
this.selectionChanged.emit(this.users);
|
||||||
|
}
|
||||||
}).catch(error => {
|
}).catch(error => {
|
||||||
this.toast.showError(error);
|
this.toast.showError(error);
|
||||||
});
|
});
|
||||||
|
Loading…
x
Reference in New Issue
Block a user