Skip to content

Commit a8ba2f3

Browse files
committed
fix: 🐛 Fixed the Request On Behalf autocomplete not filtering correctly
Ombi-app#4539
1 parent 76af4a1 commit a8ba2f3

1 file changed

Lines changed: 6 additions & 3 deletions

File tree

src/Ombi/ClientApp/src/app/shared/admin-request-dialog/admin-request-dialog.component.ts

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import { Component, Inject, OnInit } from "@angular/core";
22
import { FormBuilder, FormGroup } from "@angular/forms";
33
import { MatDialogRef, MAT_DIALOG_DATA } from "@angular/material/dialog";
4-
import { Observable } from "rxjs";
4+
import { firstValueFrom, Observable } from "rxjs";
55
import { startWith, map } from "rxjs/operators";
66
import { ILanguageProfiles, IRadarrProfile, IRadarrRootFolder, ISonarrProfile, ISonarrRootFolder, ISonarrSettings, IUserDropdown, RequestType } from "../../interfaces";
77
import { IdentityService, MessageService, RadarrService, RequestService, SettingsService, SonarrService } from "../../services";
@@ -55,7 +55,7 @@ export class AdminRequestDialogComponent implements OnInit {
5555
radarrFolderId: [null]
5656
})
5757

58-
this.options = await this.identityService.getUsersDropdown().toPromise();
58+
this.options = await firstValueFrom(this.identityService.getUsersDropdown());
5959

6060
this.filteredOptions = this.form.controls['username'].valueChanges.pipe(
6161
startWith(""),
@@ -96,7 +96,10 @@ export class AdminRequestDialogComponent implements OnInit {
9696
public displayFn(user: IUserDropdown): string {
9797
const username = user?.username ? user.username : "";
9898
const email = user?.email ? `(${user.email})` : "";
99-
return `${username} ${email}`;
99+
if (username && email) {
100+
return `${username} ${email}`;
101+
}
102+
return '';
100103
}
101104

102105
private _filter(value: string | IUserDropdown): IUserDropdown[] {

0 commit comments

Comments
 (0)