Removed load all if empty
This commit is contained in:
parent
b040815b85
commit
77e2275823
@ -1,5 +1,5 @@
|
||||
import { Inject, Injectable, InjectionToken, Injector, Optional } from '@angular/core';
|
||||
import { BehaviorSubject, firstValueFrom, Observable, Subject } from 'rxjs';
|
||||
import { BehaviorSubject, Observable, Subject } from 'rxjs';
|
||||
import { filter, map, startWith, tap } from 'rxjs/operators';
|
||||
import { IListable } from '../models';
|
||||
import { GenericService, QueryParam } from '../../services';
|
||||
@ -55,12 +55,6 @@ export class EntitiesService<E extends IListable, I = E> extends GenericService<
|
||||
);
|
||||
}
|
||||
|
||||
loadAllIfEmpty(modelPath = this._defaultModelPath, queryParams?: List<QueryParam>): Promise<unknown> | void {
|
||||
if (!this.all.length) {
|
||||
return firstValueFrom(this.loadAll(modelPath, queryParams));
|
||||
}
|
||||
}
|
||||
|
||||
getEntityChanged$(entityId: string): Observable<E | undefined> {
|
||||
return this._entityChanged$.pipe(
|
||||
filter(entity => entity.id === entityId),
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user