hughhhh commented on code in PR #20852:
URL: https://github.com/apache/superset/pull/20852#discussion_r929130717
##########
superset-frontend/src/SqlLab/components/ResultSet/index.tsx:
##########
@@ -275,11 +250,19 @@ export default class ResultSet extends
React.PureComponent<
this.props.database?.allows_virtual_table_explore && (
<ExploreResultsButton
database={this.props.database}
- onClick={() => this.setState({ showSaveDatasetModal: true })}
+ onClick={() => {
+ // There is currently redux / state issue where sometimes
a query will have serverId
+ // and other times it will not. We need this attribute
consistently for this to work
+ // const qid = this.props?.query?.results?.query_id;
+ // if (qid) {
+ // // This will open explore using the query as
datasource
+ // window.location.href =
`/explore/?dataset_type=query&dataset_id=${qid}`;
+ // } else {
+ // this.setState({ showSaveDatasetModal: true });
+ // }
+ this.setState({ showSaveDatasetModal: true });
+ }}
Review Comment:
remove these lines
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]