AAfghahi commented on code in PR #20880:
URL: https://github.com/apache/superset/pull/20880#discussion_r932385707
##########
superset/models/sql_lab.py:
##########
@@ -57,7 +57,6 @@
if TYPE_CHECKING:
from superset.db_engine_specs import BaseEngineSpec
-
Review Comment:
add this back in?
##########
superset-frontend/src/explore/components/SaveModal.tsx:
##########
@@ -145,6 +166,44 @@ class SaveModal extends React.Component<SaveModalProps,
SaveModalState> {
dashboard_title: string;
};
+ if (this.props.datasource?.type === DatasourceType.Query) {
Review Comment:
Will this conditional be true for saved queries as well? Is it worth to
change this to !== Table?
##########
superset-frontend/src/explore/components/SaveModal.tsx:
##########
@@ -71,8 +84,11 @@ class SaveModal extends React.Component<SaveModalProps,
SaveModalState> {
this.state = {
saveToDashboardId: null,
newSliceName: props.sliceName,
+ datasetName: props.datasource?.name,
Review Comment:
It looks like this is where you want to set the default '' value? I am
confused why you had the empty string in the interface
##########
superset-frontend/src/explore/components/SaveModal.tsx:
##########
@@ -55,14 +60,22 @@ type SaveModalState = {
saveToDashboardId: number | string | null;
newSliceName?: string;
newDashboardName?: string;
+ datasetName: '';
Review Comment:
shouldn't this be string?
--
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]