You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@superset.apache.org by di...@apache.org on 2024/07/18 12:23:52 UTC

(superset) 01/02: Unblock dashboard

This is an automated email from the ASF dual-hosted git repository.

diegopucci pushed a commit to branch geido/chore/unblock-dashboard-skeleton
in repository https://gitbox.apache.org/repos/asf/superset.git

commit 4ca8e0731167ddf360f61d078dfc3a7dce25b65c
Author: Diego Pucci <di...@gmail.com>
AuthorDate: Thu Jul 18 14:42:32 2024 +0300

    Unblock dashboard
---
 superset-frontend/src/dashboard/containers/DashboardPage.tsx | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/superset-frontend/src/dashboard/containers/DashboardPage.tsx b/superset-frontend/src/dashboard/containers/DashboardPage.tsx
index e8c9283462..1825b40f00 100644
--- a/superset-frontend/src/dashboard/containers/DashboardPage.tsx
+++ b/superset-frontend/src/dashboard/containers/DashboardPage.tsx
@@ -192,7 +192,8 @@ export const DashboardPage: FC<PageProps> = ({ idOrSlug }: PageProps) => {
   }, [addDangerToast, datasets, datasetsApiError, dispatch]);
 
   if (error) throw error; // caught in error boundary
-  if (!readyToRender || !hasDashboardInfoInitiated) return <Loading />;
+
+  const isLoading = !dashboard || !hasDashboardInfoInitiated;
 
   return (
     <>
@@ -208,7 +209,7 @@ export const DashboardPage: FC<PageProps> = ({ idOrSlug }: PageProps) => {
       <SyncDashboardState dashboardPageId={dashboardPageId} />
       <DashboardPageIdContext.Provider value={dashboardPageId}>
         <DashboardContainer>
-          <DashboardBuilder />
+          {isLoading ? <Loading /> : <DashboardBuilder />}
         </DashboardContainer>
       </DashboardPageIdContext.Provider>
     </>