Use replace instead of set to trigger entity changed

This commit is contained in:
Adina Țeudan 2021-11-18 15:21:13 +02:00
parent d3d322d444
commit 4242cd442b

View File

@ -49,7 +49,7 @@ export class EntitiesService<E extends IListable, I = E> extends GenericService<
loadAll(modelPath = this._defaultModelPath, queryParams?: List<QueryParam>): Observable<E[]> {
return this.getAll(modelPath, queryParams).pipe(
mapEach(entity => new this._entityClass(entity)),
tap((entities: E[]) => this.setEntities(entities)),
tap((entities: E[]) => this.replace(entities)),
);
}