Skip to content

Commit

Permalink
clears errors when closing out of modal (#15623)
Browse files Browse the repository at this point in the history
  • Loading branch information
AAfghahi committed Jul 9, 2021
1 parent 4d1672f commit 2ebba51
Showing 1 changed file with 2 additions and 0 deletions.
Expand Up @@ -355,6 +355,7 @@ const DatabaseModal: FunctionComponent<DatabaseModalProps> = ({
fetchResource,
createResource,
updateResource,
clearError,
} = useSingleViewResource<DatabaseObject>(
'database',
t('database'),
Expand Down Expand Up @@ -399,6 +400,7 @@ const DatabaseModal: FunctionComponent<DatabaseModalProps> = ({
setDB({ type: ActionType.reset });
setHasConnectedDb(false);
setValidationErrors(null); // reset validation errors on close
clearError();
setEditNewDb(false);
onHide();
};
Expand Down

0 comments on commit 2ebba51

Please sign in to comment.