chore: update connection creation modal

This commit is contained in:
steven
2023-03-29 16:59:37 +08:00
parent efc30299e8
commit 7bb68fd28a
2 changed files with 4 additions and 2 deletions

View File

@ -32,7 +32,8 @@ const CreateConnectionModal = (props: Props) => {
const [isRequesting, setIsRequesting] = useState(false);
const showDatabaseField = connection.engineType === Engine.PostgreSQL;
const isEditing = editConnection !== undefined;
const allowSave = connection.host !== "" && connection.username !== "";
const allowSave =
connection.host !== "" && connection.username !== "" && (connection.engineType === Engine.PostgreSQL ? connection.database : true);
useEffect(() => {
if (show) {