Revert "fix(sql lab): display the 'View Results' button consistently in the history tab on sync mode (#19362)" (#19906)

This reverts commit 6d5d03e592.
This commit is contained in:
Luis Casillas
2022-05-02 12:45:43 -05:00
committed by GitHub
parent 6bd025d8d2
commit 1fa841ee29
3 changed files with 2 additions and 13 deletions

View File

@@ -247,16 +247,9 @@ 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 (
(this.props.query.resultsKey &&
nextProps.query.resultsKey &&
nextProps.query.resultsKey !== this.props.query.resultsKey) ||
(nextProps.query.id !== this.props.query.id && nextProps.query.resultsKey)
nextProps.query.resultsKey &&
nextProps.query.resultsKey !== this.props.query.resultsKey
) {
this.fetchResults(nextProps.query);
}