betodealmeida commented on a change in pull request #17044:
URL: https://github.com/apache/superset/pull/17044#discussion_r725358410
##########
File path: superset-frontend/src/views/CRUD/data/dataset/AddDatasetModal.tsx
##########
@@ -80,9 +79,21 @@ const DatasetModal: FunctionComponent<DatasetModalProps> = ({
setTableName(tableName);
};
+ const clearModal = () => {
+ setSchema('');
+ setTableName('');
+ setCurrentDatabase(undefined);
+ setDisableSave(true);
+ };
+
+ const hide = () => {
+ clearModal();
+ onHide();
+ };
+
const onSave = () => {
const data = {
- database: datasourceId,
+ database: currentDatabase?.id || 0,
Review comment:
Let me clean this up... here `currentDatabase` will always be defined,
otherwise you can't save.
--
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]