From 0e619bfbcd2a71bdcc27e6eae4a8d5792194b6c5 Mon Sep 17 00:00:00 2001 From: sumeyyeKurtulus Date: Tue, 17 Sep 2024 08:28:40 +0300 Subject: [PATCH] remove: router wait service check --- .../ngx-datatable-list.directive.ts | 21 +++++++------------ 1 file changed, 8 insertions(+), 13 deletions(-) diff --git a/npm/ng-packs/packages/theme-shared/src/lib/directives/ngx-datatable-list.directive.ts b/npm/ng-packs/packages/theme-shared/src/lib/directives/ngx-datatable-list.directive.ts index e8e49bad34..b8811106dd 100644 --- a/npm/ng-packs/packages/theme-shared/src/lib/directives/ngx-datatable-list.directive.ts +++ b/npm/ng-packs/packages/theme-shared/src/lib/directives/ngx-datatable-list.directive.ts @@ -14,8 +14,7 @@ import { } from '@angular/core'; import { takeUntilDestroyed } from '@angular/core/rxjs-interop'; import { DatatableComponent } from '@swimlane/ngx-datatable'; -import { combineLatest } from 'rxjs'; -import { ListService, LocalizationService, RouterWaitService } from '@abp/ng.core'; +import { ListService, LocalizationService } from '@abp/ng.core'; import { defaultNgxDatatableMessages, NGX_DATATABLE_MESSAGES, @@ -34,7 +33,6 @@ export class NgxDatatableListDirective implements OnChanges, OnInit, DoCheck, Af protected readonly destroyRef = inject(DestroyRef); protected readonly localizationService = inject(LocalizationService); protected readonly ngxDatatableMessages = inject(NGX_DATATABLE_MESSAGES, { optional: true }); - protected readonly routerWaitService = inject(RouterWaitService); protected readonly viewContainerRef = inject(ViewContainerRef); protected readonly renderer = inject(Renderer2); @@ -72,16 +70,13 @@ export class NgxDatatableListDirective implements OnChanges, OnInit, DoCheck, Af } protected subscribeToLoadingState() { - combineLatest([this.list.isLoading$, this.routerWaitService.getLoading$()]).subscribe( - ([listLoading, routerLoading]) => { - const isLoading = listLoading || routerLoading; - if (isLoading) { - this.handleLoadingStart(); - } else { - this.handleLoadingStop(); - } - }, - ); + this.list.isLoading$.subscribe(listLoading => { + if (listLoading) { + this.handleLoadingStart(); + } else { + this.handleLoadingStop(); + } + }); } protected handleLoadingStop() {