AAfghahi commented on a change in pull request #15242:
URL: https://github.com/apache/superset/pull/15242#discussion_r654050035



##########
File path: 
superset-frontend/src/views/CRUD/data/database/DatabaseModal/index.tsx
##########
@@ -596,10 +598,32 @@ const DatabaseModal: 
FunctionComponent<DatabaseModalProps> = ({
     }
   }, [availableDbs]);
 
+  useEffect(() => {

Review comment:
       true good point. 

##########
File path: 
superset-frontend/src/views/CRUD/data/database/DatabaseModal/index.tsx
##########
@@ -596,10 +598,32 @@ const DatabaseModal: 
FunctionComponent<DatabaseModalProps> = ({
     }
   }, [availableDbs]);
 
+  useEffect(() => {
+    if (validationErrors) {
+      setHasErrors(true);
+    } else {
+      setHasErrors(false);
+    }
+  }, [validationErrors]);
+  // Used as componentDidMount
+
   const tabChange = (key: string) => {
     setTabKey(key);
   };
 
+  const errorAlert = () => {
+    const errors = validationErrors;
+    return (
+      <Alert
+        type="error"
+        css={(theme: SupersetTheme) => antDErrorAlertStyles(theme)}
+        message="Missing Required Fields"

Review comment:
       I hadn't thought about a map, though I really like that. 
   
   No, I figured that language was prone to change, I wanted this in there to 
make sure that it looked ok, and so that I could style it. 




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