Skip to content

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

fix: page won't refresh when changing project (#10165)

Liu Ji228ff5360d90
diff --git a/frontend/src/components/SyncDatabaseSchema/DatabaseSchemaSelector.vue b/frontend/src/components/SyncDatabaseSchema/DatabaseSchemaSelector.vue
index b1500ad7b8..1bd12fc999 100644
--- a/frontend/src/components/SyncDatabaseSchema/DatabaseSchemaSelector.vue
+++ b/frontend/src/components/SyncDatabaseSchema/DatabaseSchemaSelector.vue
@@ -290,7 +290,7 @@ const renderSchemaVersionLabel = (option: SelectOption) => {
option.disabled ||
!option.changeHistory
) {
- return option.label;
+ return option.label as string;
}
const changeHistory = option.changeHistory as ChangeHistory;
const index = option.index as number;
diff --git a/frontend/src/components/SyncDatabaseSchema/index.vue b/frontend/src/components/SyncDatabaseSchema/index.vue
index 2e63380081..c344e42525 100644
--- a/frontend/src/components/SyncDatabaseSchema/index.vue
+++ b/frontend/src/components/SyncDatabaseSchema/index.vue
@@ -77,6 +77,10 @@ import {
SourceSchemaType,
} from "./types";
+defineOptions({
+ name: "SyncDatabaseSchema",
+});
+
const SELECT_SOURCE_SCHEMA = 0;
const SELECT_TARGET_DATABASE_LIST = 1;
diff --git a/frontend/src/views/ProjectDetail.vue b/frontend/src/views/ProjectDetail.vue
index 822c74a05f..20a7509196 100644
--- a/frontend/src/views/ProjectDetail.vue
+++ b/frontend/src/views/ProjectDetail.vue
@@ -24,7 +24,7 @@
<ChangelistDashboard :project="project" />
</template>
<template v-if="hash === 'sync-schema'">
- <SyncDatabaseSchema :project="project" />
+ <SyncDatabaseSchema :key="project.name" :project="project" />
</template>
<template v-if="hash === 'slow-query'">
<ProjectSlowQueryPanel :project="project" />