hughhhh commented on a change in pull request #11755:
URL: 
https://github.com/apache/incubator-superset/pull/11755#discussion_r537961293



##########
File path: superset-frontend/src/SqlLab/components/ResultSet.tsx
##########
@@ -124,6 +208,187 @@ export default class ResultSet extends 
React.PureComponent<
     }
   }
 
+  handleOnChangeAutoComplete = () => {
+    this.setState({ datasetToOverwrite: {} });
+  };
+
+  handleOverwriteDataset = async () => {
+    const { sql, results } = this.props.query;
+    const { datasetToOverwrite } = this.state;
+
+    if (
+      Object.keys(datasetToOverwrite).length === 0 &&
+      datasetToOverwrite.constructor === Object

Review comment:
       Good catch i actually figured out how to prevent this via 
onChangeAutocomplete. Users have to choose a value from the dropdown before 
progressing to the overwrite page. So we don't need this condition.




----------------------------------------------------------------
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.

For queries about this service, please contact Infrastructure at:
[email protected]



---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to