hughhhh commented on a change in pull request #15377:
URL: https://github.com/apache/superset/pull/15377#discussion_r658460741



##########
File path: 
superset-frontend/src/views/CRUD/data/database/DatabaseModal/index.tsx
##########
@@ -651,15 +673,44 @@ const DatabaseModal: 
FunctionComponent<DatabaseModalProps> = ({
     setTabKey(key);
   };
 
-  const errorAlert = () => (
-    <Alert
-      type="error"
-      css={(theme: SupersetTheme) => antDErrorAlertStyles(theme)}
-      message="Missing Required Fields"
-      description="Please complete all required fields."
-      showIcon
-    />
-  );
+  const errorAlert = () => {
+    if (
+      validationErrors &&

Review comment:
       Also add isEmpty check for dbError here

##########
File path: 
superset-frontend/src/views/CRUD/data/database/DatabaseModal/index.tsx
##########
@@ -651,15 +673,44 @@ const DatabaseModal: 
FunctionComponent<DatabaseModalProps> = ({
     setTabKey(key);
   };
 
-  const errorAlert = () => (
-    <Alert
-      type="error"
-      css={(theme: SupersetTheme) => antDErrorAlertStyles(theme)}
-      message="Missing Required Fields"
-      description="Please complete all required fields."
-      showIcon
-    />
-  );
+  const errorAlert = () => {
+    if (
+      validationErrors &&

Review comment:
       Don't need this validation check since it's in isEmpty




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

For queries about this service, please contact Infrastructure at:
[email protected]



---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to