]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
mgr/dashboard: fix table loading while fetching data 64634/head
authorNizamudeen A <nia@redhat.com>
Wed, 23 Jul 2025 11:09:46 +0000 (16:39 +0530)
committerNizamudeen A <nia@redhat.com>
Mon, 28 Jul 2025 09:06:55 +0000 (14:36 +0530)
don't stop loading until all the data is properly fetched

Fixes: https://tracker.ceph.com/issues/64170
Signed-off-by: Nizamudeen A <nia@redhat.com>
src/pybind/mgr/dashboard/frontend/src/app/shared/datatable/table/table.component.ts

index 787d0417331240c2410063bee3df2f38d036a772..8494f70a9650bfbae05f091150346adb7d180f0a 100644 (file)
@@ -562,9 +562,9 @@ export class TableComponent implements AfterViewInit, OnInit, OnChanges, OnDestr
     // this method was triggered by ngOnChanges().
     if (this.fetchData.observers.length > 0) {
       this.loadingIndicator = true;
-      const loadingSubscription = this.fetchData.subscribe(() => {
-        this.loadingIndicator = false;
-        this.cdRef.detectChanges();
+      const loadingSubscription = this.fetchData.subscribe({
+        next: () => this.cdRef.detectChanges(),
+        complete: () => (this.loadingIndicator = false)
       });
       this._subscriptions.add(loadingSubscription);
     }