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


##########
superset-frontend/src/explore/components/DatasourcePanel/index.tsx:
##########
@@ -429,24 +444,27 @@ export default function DataSourcePanel({
       columnSlice,
       inputValue,
       lists.columns.length,
-      lists.metrics.length,
+      lists?.metrics?.length,
       metricSlice,
       search,
       showAllColumns,
       showAllMetrics,
+      dataSourceIsQuery,
       shouldForceUpdate,
     ],
   );
 
   return (
     <DatasourceContainer>
-      <SaveDatasetModal
-        visible={showSaveDatasetModal}
-        onHide={() => setShowSaveDatasetModal(false)}
-        buttonTextOnSave={t('Save')}
-        buttonTextOnOverwrite={t('Overwrite')}
-        datasource={datasource}
-      />
+      {dataSourceIsQuery && (

Review Comment:
   this is a bit of a nit, but I would consider flipping this to be `if 
datasource is not a dataset, then show the modal to save dataset`, only because 
otherwise, there's business logic in the code.. why does a query show this 
modal, for example? It's just a little more clear perhaps to do it the opposite 
way. 



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