Browse Source

set loading state to true every list request

pull/12973/head
muhammedaltug 4 years ago
parent
commit
1cedd4adb6
  1. 3
      npm/ng-packs/packages/core/src/lib/services/list.service.ts

3
npm/ng-packs/packages/core/src/lib/services/list.service.ts

@ -106,9 +106,8 @@ export class ListService<QueryParamsType = ABP.PageQueryParams | any> implements
hookToQuery<T>(
streamCreatorCallback: QueryStreamCreatorCallback<T, QueryParamsType>,
): Observable<PagedResultDto<T>> {
this._isLoading$.next(true);
return this.query$.pipe(
tap(() => this._isLoading$.next(true)),
switchMap(query => streamCreatorCallback(query).pipe(catchError(() => of(null)))),
filter(Boolean),
tap(() => this._isLoading$.next(false)),

Loading…
Cancel
Save