Browse Source
Merge pull request #12973 from abpframework/fix/11620
set loading state to true every list request
pull/12986/head
Mahmut Gundogdu
4 years ago
committed by
GitHub
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with
1 additions and
2 deletions
-
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)), |
|
|
|
|