This is an automated email from the ASF dual-hosted git repository.
yongjiezhao pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/superset.git
The following commit(s) were added to refs/heads/master by this push:
new 558201c865 fix: "Refresh Dashboard" only refreshes active tab (#20688)
558201c865 is described below
commit 558201c8653dfb2ee5f011662ee0e0a79f4b281d
Author: Diego Medina <[email protected]>
AuthorDate: Thu Jul 14 00:52:36 2022 -0300
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 0c2abbfb0c..314dd6d1cb 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) {