From 558201c8653dfb2ee5f011662ee0e0a79f4b281d Mon Sep 17 00:00:00 2001 From: Diego Medina Date: Thu, 14 Jul 2022 00:52:36 -0300 Subject: [PATCH] fix: "Refresh Dashboard" only refreshes active tab (#20688) --- .../src/dashboard/components/gridComponents/Chart.jsx | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/superset-frontend/src/dashboard/components/gridComponents/Chart.jsx b/superset-frontend/src/dashboard/components/gridComponents/Chart.jsx index 0c2abbfb0c71e..314dd6d1cb0ea 100644 --- a/superset-frontend/src/dashboard/components/gridComponents/Chart.jsx +++ b/superset-frontend/src/dashboard/components/gridComponents/Chart.jsx @@ -162,6 +162,14 @@ class Chart extends React.Component { return true; } + // allow chart to update if the status changed and the previous status was loading. + if ( + this.props?.chart?.chartStatus !== nextProps?.chart?.chartStatus && + this.props?.chart?.chartStatus === 'loading' + ) { + return true; + } + // allow chart update/re-render only if visible: // under selected tab or no tab layout if (nextProps.isComponentVisible) {