Skip to content

Database governance built for humans and agents — controlling changes and access across every major database.

chore: auto select the first diff database (#5844)

boojack7c131958805c
diff --git a/frontend/src/views/SyncDatabaseSchema/SelectTargetDatabasesView.vue b/frontend/src/views/SyncDatabaseSchema/SelectTargetDatabasesView.vue
index 1f54c7efe0..df51da06f1 100644
--- a/frontend/src/views/SyncDatabaseSchema/SelectTargetDatabasesView.vue
+++ b/frontend/src/views/SyncDatabaseSchema/SelectTargetDatabasesView.vue
@@ -238,7 +238,7 @@
<script lang="ts" setup>
import { toClipboard } from "@soerenmartius/vue3-clipboard";
import axios from "axios";
-import { isEqual } from "lodash-es";
+import { head, isEqual } from "lodash-es";
import { NEllipsis } from "naive-ui";
import { PropType, computed, onMounted, reactive, ref, watch } from "vue";
import { CodeDiff } from "v-code-diff";
@@ -471,6 +471,10 @@ watch(
) {
state.selectedDatabaseId = undefined;
}
+
+ if (state.selectedDatabaseId === undefined) {
+ state.selectedDatabaseId = head(databaseListWithDiff.value)?.id;
+ }
}
);