Database governance built for humans and agents — controlling changes and access across every major database.
Go cicddata-governancedata-maskingdata-securitydatabase-accessdatabase-governancedevopsdevsecopsflywaygitopsliquibasemongodbmysqloraclepostgresqlschema-migrationssecuritysql-clientsqlservertidb
chore: fix creating release drawer state (#14581)
boojack0c22d3b74b1f
diff --git a/frontend/src/components/Release/ReleaseCreate/FileToCreateTable/CreateReleaseFilesPanel.vue b/frontend/src/components/Release/ReleaseCreate/FileToCreateTable/CreateReleaseFilesPanel.vueindex 70894f8e62..25fbf38588 100644--- a/frontend/src/components/Release/ReleaseCreate/FileToCreateTable/CreateReleaseFilesPanel.vue+++ b/frontend/src/components/Release/ReleaseCreate/FileToCreateTable/CreateReleaseFilesPanel.vue@@ -1,5 +1,5 @@<template>- <Drawer v-bind="$attrs" @close="emit('close')">+ <Drawer :show="show" v-bind="$attrs" @close="emit('close')"><DrawerContent class="w-176" :title="$t('release.actions.new-file')"><template #default><div class="w-full flex flex-col gap-4">@@ -98,6 +98,7 @@ interface LocalState {}const props = defineProps<{+ show: boolean;file?: FileToCreate;}>();@@ -176,7 +177,7 @@ const onConfirm = () => {};watch(- () => props.file,+ () => props.show,() => {state.files = [];if (props.file) {diff --git a/frontend/src/components/Release/ReleaseCreate/FileToCreateTable/FileToCreateTable.vue b/frontend/src/components/Release/ReleaseCreate/FileToCreateTable/FileToCreateTable.vueindex cb43f6d8ce..36054c5dee 100644--- a/frontend/src/components/Release/ReleaseCreate/FileToCreateTable/FileToCreateTable.vue+++ b/frontend/src/components/Release/ReleaseCreate/FileToCreateTable/FileToCreateTable.vue@@ -61,7 +61,7 @@ import {type DataTableColumn,type DropdownOption,} from "naive-ui";-import { computed, reactive } from "vue";+import { computed, reactive, watch } from "vue";import { useI18n } from "vue-i18n";import { useReleaseCreateContext, type FileToCreate } from "../context";import CreateReleaseFilesPanel from "./CreateReleaseFilesPanel.vue";@@ -129,4 +129,20 @@ const rowProps = (row: FileToCreate) => {},};};++watch(+ files,+ () => {+ // Clear selected file if it's not in the list anymore.+ if (+ state.selectedFile &&+ !files.value.find((file) => file.id === state.selectedFile?.id)+ ) {+ state.selectedFile = undefined;+ }+ },+ {+ immediate: true,+ }+);</script>