mirror of
https://github.com/Alfresco/alfresco-ng2-components.git
synced 2026-09-09 18:03:21 +00:00
AAE-35340 Replace deprecated toPromise() usages with firstValueFrom / lastValueFrom (#11161)
This commit is contained in:
@@ -31,7 +31,7 @@ import {
|
||||
} from '@angular/core';
|
||||
import { ReactiveFormsModule, UntypedFormControl } from '@angular/forms';
|
||||
import { animate, state, style, transition, trigger } from '@angular/animations';
|
||||
import { BehaviorSubject, Observable } from 'rxjs';
|
||||
import { BehaviorSubject, firstValueFrom, Observable } from 'rxjs';
|
||||
import { debounceTime, distinctUntilChanged, filter, mergeMap, switchMap, tap } from 'rxjs/operators';
|
||||
import { ComponentSelectionMode } from '../../types';
|
||||
import { IdentityGroupModel } from '../models/identity-group.model';
|
||||
@@ -248,7 +248,7 @@ export class GroupCloudComponent implements OnInit, OnChanges {
|
||||
}
|
||||
|
||||
private async searchGroup(name: string): Promise<IdentityGroupModel> {
|
||||
return (await this.identityGroupService.search(name).toPromise())[0];
|
||||
return (await firstValueFrom(this.identityGroupService.search(name)))[0];
|
||||
}
|
||||
|
||||
private getPreselectedGroups(): IdentityGroupModel[] {
|
||||
|
||||
Reference in New Issue
Block a user