eschutho commented on code in PR #19855:
URL: https://github.com/apache/superset/pull/19855#discussion_r863277793


##########
superset-frontend/src/SqlLab/components/ResultSet/index.tsx:
##########
@@ -500,48 +228,28 @@ export default class ResultSet extends 
React.PureComponent<
       }
       const { columns } = this.props.query.results;
       // Added compute logic to stop user from being able to Save & Explore
-      const {
-        saveDatasetRadioBtnState,
-        newSaveDatasetName,
-        datasetToOverwrite,
-        saveModalAutocompleteValue,
-        shouldOverwriteDataSet,
-        userDatasetOptions,
-        showSaveDatasetModal,
-      } = this.state;
-      const disableSaveAndExploreBtn =
-        (saveDatasetRadioBtnState === DatasetRadioState.SAVE_NEW &&
-          newSaveDatasetName.length === 0) ||
-        (saveDatasetRadioBtnState === DatasetRadioState.OVERWRITE_DATASET &&
-          Object.keys(datasetToOverwrite).length === 0 &&
-          saveModalAutocompleteValue.length === 0);
+      const { showSaveDatasetModal } = this.state;
 
       return (
         <ResultSetControls>
           <SaveDatasetModal
             visible={showSaveDatasetModal}
-            onOk={this.handleSaveInDataset}
-            saveDatasetRadioBtnState={saveDatasetRadioBtnState}
-            shouldOverwriteDataset={shouldOverwriteDataSet}
-            defaultCreateDatasetValue={newSaveDatasetName}
-            userDatasetOptions={userDatasetOptions}
-            disableSaveAndExploreBtn={disableSaveAndExploreBtn}
-            onHide={this.handleHideSaveModal}
-            handleDatasetNameChange={this.handleDatasetNameChange}
-            
handleSaveDatasetRadioBtnState={this.handleSaveDatasetRadioBtnState}
-            handleOverwriteCancel={this.handleOverwriteCancel}
-            handleOverwriteDataset={this.handleOverwriteDataset}
-            handleOverwriteDatasetOption={this.handleOverwriteDatasetOption}
-            handleSaveDatasetModalSearch={this.handleSaveDatasetModalSearch}
-            filterAutocompleteOption={this.handleFilterAutocompleteOption}
-            onChangeAutoComplete={this.handleOnChangeAutoComplete}
+            onHide={() => this.setState({ showSaveDatasetModal: false })}
+            buttonTextOnSave={t('Save & Explore')}
+            buttonTextOnOverwrite={t('Overwrite & Explore')}
+            modalDescription={t(
+              'Save this query as a virtual dataset to continue exploring',
+            )}
+            user={this.props.user}

Review Comment:
   can we get this from redux inside the savedatasetmodal?



-- 
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: notifications-unsubscr...@superset.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscr...@superset.apache.org
For additional commands, e-mail: notifications-h...@superset.apache.org

Reply via email to