diff --git a/superset-frontend/src/views/CRUD/data/database/DatabaseModal/index.tsx b/superset-frontend/src/views/CRUD/data/database/DatabaseModal/index.tsx index 63afc6ac2864..03c6fc4a6f9b 100644 --- a/superset-frontend/src/views/CRUD/data/database/DatabaseModal/index.tsx +++ b/superset-frontend/src/views/CRUD/data/database/DatabaseModal/index.tsx @@ -588,18 +588,20 @@ const DatabaseModal: FunctionComponent = ({ setEditNewDb(true); }; + const handleBackButtonOnConnect = () => { + if (editNewDb) { + setHasConnectedDb(false); + } + setDB({ type: ActionType.reset }); + }; + const renderModalFooter = () => { if (db) { // if db show back + connenct if (!hasConnectedDb || editNewDb) { return ( <> - { - setDB({ type: ActionType.reset }); - }} - > + Back