From fb713c9130a708450c08a17fa6494970e6f1922e Mon Sep 17 00:00:00 2001 From: Nizamudeen A Date: Wed, 23 Jul 2025 16:39:46 +0530 Subject: [PATCH] mgr/dashboard: fix table loading while fetching data don't stop loading until all the data is properly fetched Fixes: https://tracker.ceph.com/issues/64170 Signed-off-by: Nizamudeen A --- .../src/app/shared/datatable/table/table.component.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/pybind/mgr/dashboard/frontend/src/app/shared/datatable/table/table.component.ts b/src/pybind/mgr/dashboard/frontend/src/app/shared/datatable/table/table.component.ts index 787d041733124..8494f70a9650b 100644 --- a/src/pybind/mgr/dashboard/frontend/src/app/shared/datatable/table/table.component.ts +++ b/src/pybind/mgr/dashboard/frontend/src/app/shared/datatable/table/table.component.ts @@ -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); } -- 2.39.5