mirror of
https://github.com/apache/superset.git
synced 2026-04-22 09:35:23 +00:00
fix(sql lab): display the 'View Results' button consistently in the history tab on sync mode (#19362)
* fix(sql lab): display the 'View Results' button in the history tab when running sync queries * pr comment
This commit is contained in:
@@ -247,9 +247,16 @@ export default class ResultSet extends React.PureComponent<
|
||||
this.clearQueryResults(nextProps.query),
|
||||
);
|
||||
}
|
||||
|
||||
// Only fetch results if the result key change
|
||||
// If we didn't have a result key before, then the results are loaded elsewhere
|
||||
// so we can skip it, unless the query id changed, in that case we should
|
||||
// refetch regardless.
|
||||
if (
|
||||
nextProps.query.resultsKey &&
|
||||
nextProps.query.resultsKey !== this.props.query.resultsKey
|
||||
(this.props.query.resultsKey &&
|
||||
nextProps.query.resultsKey &&
|
||||
nextProps.query.resultsKey !== this.props.query.resultsKey) ||
|
||||
(nextProps.query.id !== this.props.query.id && nextProps.query.resultsKey)
|
||||
) {
|
||||
this.fetchResults(nextProps.query);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user