Skip to content

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

chore: reset input state when drawer reopens (#7719)

Liu Jic0cf9161ff20
diff --git a/frontend/src/components/IssueV1/components/Panel/CommonDrawer.vue b/frontend/src/components/IssueV1/components/Panel/CommonDrawer.vue
index e22f144e78..086a301052 100644
--- a/frontend/src/components/IssueV1/components/Panel/CommonDrawer.vue
+++ b/frontend/src/components/IssueV1/components/Panel/CommonDrawer.vue
@@ -25,16 +25,27 @@
<script setup lang="ts">
import { zindexable as vZindexable } from "vdirs";
+import { watch } from "vue";
import { BBSpin } from "@/bbkit";
import { Drawer, DrawerContent } from "@/components/v2";
-defineProps<{
+const props = defineProps<{
title: string;
show: boolean;
loading: boolean;
}>();
-defineEmits<{
+const emit = defineEmits<{
+ (event: "show"): void;
(event: "close"): void;
}>();
+
+watch(
+ () => props.show,
+ (newShow, oldShow) => {
+ if (newShow && !oldShow) {
+ emit("show");
+ }
+ }
+);
</script>
diff --git a/frontend/src/components/IssueV1/components/Panel/IssueReviewActionPanel.vue b/frontend/src/components/IssueV1/components/Panel/IssueReviewActionPanel.vue
index 63eec54086..4735a0048f 100644
--- a/frontend/src/components/IssueV1/components/Panel/IssueReviewActionPanel.vue
+++ b/frontend/src/components/IssueV1/components/Panel/IssueReviewActionPanel.vue
@@ -3,6 +3,7 @@
:show="action !== undefined"
:title="title"
:loading="state.loading"
+ @show="comment = ''"
@close="$emit('close')"
>
<template #default>
diff --git a/frontend/src/components/IssueV1/components/Panel/IssueStatusActionPanel.vue b/frontend/src/components/IssueV1/components/Panel/IssueStatusActionPanel.vue
index 6a65126f00..46b9770bcd 100644
--- a/frontend/src/components/IssueV1/components/Panel/IssueStatusActionPanel.vue
+++ b/frontend/src/components/IssueV1/components/Panel/IssueStatusActionPanel.vue
@@ -3,6 +3,7 @@
:show="action !== undefined"
:title="title"
:loading="state.loading"
+ @show="comment = ''"
@close="$emit('close')"
>
<template #default>
diff --git a/frontend/src/components/IssueV1/components/Panel/TaskRolloutActionPanel.vue b/frontend/src/components/IssueV1/components/Panel/TaskRolloutActionPanel.vue
index 5e6c220e77..c9dd564b45 100644
--- a/frontend/src/components/IssueV1/components/Panel/TaskRolloutActionPanel.vue
+++ b/frontend/src/components/IssueV1/components/Panel/TaskRolloutActionPanel.vue
@@ -3,6 +3,7 @@
:show="action !== undefined"
:title="title"
:loading="state.loading"
+ @show="comment = ''"
@close="$emit('close')"
>
<template #default>