Database governance built for humans and agents — controlling changes and access across every major database.
Go cicddata-governancedata-maskingdata-securitydatabase-accessdatabase-governancedevopsdevsecopsflywaygitopsliquibasemongodbmysqloraclepostgresqlschema-migrationssecuritysql-clientsqlservertidb
fix: auto reset in selector (#16395)
ecmadaob3778bd28a9e
diff --git a/frontend/src/components/v2/Select/DatabaseSelect.vue b/frontend/src/components/v2/Select/DatabaseSelect.vueindex edb93cfa97..4b519fdf49 100644--- a/frontend/src/components/v2/Select/DatabaseSelect.vue+++ b/frontend/src/components/v2/Select/DatabaseSelect.vue@@ -207,7 +207,7 @@ const renderLabel = (database: ComposedDatabase) => {// might not exist in the new list. In such case, we need to invalidate the selection// and emit the event.const resetInvalidSelection = () => {- if (!props.autoReset) return;+ if (!props.autoReset || props.multiple) return;if (!state.loading &&props.databaseName &&diff --git a/frontend/src/components/v2/Select/InstanceSelect.vue b/frontend/src/components/v2/Select/InstanceSelect.vueindex 242364b1e4..3f57af4906 100644--- a/frontend/src/components/v2/Select/InstanceSelect.vue+++ b/frontend/src/components/v2/Select/InstanceSelect.vue@@ -155,7 +155,12 @@ const options = computed(() => {// might not exist in the new list. In such case, we need to reset the selection// and emit the event.const resetInvalidSelection = () => {- if (!props.autoReset) return;+ if (!props.autoReset) {+ return;+ }+ if (state.loading) {+ return;+ }if (props.instanceName &&!state.rawInstanceList.find((item) => item.name === props.instanceName)@@ -166,6 +171,7 @@ const resetInvalidSelection = () => {watch([+ () => state.loading,() => props.instanceName,() => state.rawInstanceList,() => props.projectName,diff --git a/frontend/src/components/v2/Select/UserSelect.vue b/frontend/src/components/v2/Select/UserSelect.vueindex e94809a8a2..9d422b2def 100644--- a/frontend/src/components/v2/Select/UserSelect.vue+++ b/frontend/src/components/v2/Select/UserSelect.vue@@ -205,7 +205,12 @@ const filterByEmail = (pattern: string, user: User) => {// might not exist in the new list. In such case, we need to invalidate the selection// and emit the event.const resetInvalidSelection = () => {- if (!props.autoReset) return;+ if (!props.autoReset || props.multiple) {+ return;+ }+ if (state.loading) {+ return;+ }if (props.user &&!state.rawUserList.find((user) => extractUserId(user.name) === props.user)@@ -215,7 +220,7 @@ const resetInvalidSelection = () => {};watch(- [() => props.user, () => props.users, state.rawUserList],+ [() => state.loading, () => props.user, state.rawUserList],resetInvalidSelection,{immediate: true,