Skip to content

Commit

Permalink
fix: "Refresh Dashboard" only refreshes active tab (#20688)
Browse files Browse the repository at this point in the history
  • Loading branch information
diegomedina248 committed Jul 14, 2022
1 parent e1ade31 commit 558201c
Showing 1 changed file with 8 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down

0 comments on commit 558201c

Please sign in to comment.