Skip to content

Commit

Permalink
[fix] allow force refresh for No Results chart
Browse files Browse the repository at this point in the history
  • Loading branch information
Grace committed Mar 30, 2020
1 parent cfa7868 commit b64270b
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
1 change: 1 addition & 0 deletions superset-frontend/src/chart/chartReducer.js
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,7 @@ export default function chartReducer(charts = {}, action) {
chartStatus: 'success',
queryResponse: action.queryResponse,
chartAlert: null,
chartUpdateEndTime: now(),
};
},
[actions.CHART_UPDATE_STARTED](state) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,10 @@ class SliceHeaderControls extends React.PureComponent {
</Dropdown.Toggle>

<Dropdown.Menu>
<MenuItem onClick={this.refreshChart} disabled={!updatedDttm}>
<MenuItem
onClick={this.refreshChart}
disabled={this.props.chartStatus === 'loading'}
>
{t('Force refresh')}
<div className="refresh-tooltip">{refreshTooltip}</div>
</MenuItem>
Expand Down

0 comments on commit b64270b

Please sign in to comment.