Skip to content

Commit 99329a4

Browse files
committed
fix: keep popover in sync with inline params visibility changes
1 parent 96edefb commit 99329a4

2 files changed

Lines changed: 17 additions & 1 deletion

File tree

ui/src/components/ai-chat/index.vue

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,12 @@
4747
</div>
4848
<el-popover
4949
v-if="!firsUserInput && !isNarrow"
50-
v-model:visible="showUserInput"
50+
:visible="showUserInput"
51+
@update:visible="
52+
(v: boolean) => {
53+
if (v) showUserInput = true
54+
}
55+
"
5156
:virtual-ref="triggerEl"
5257
virtual-triggering
5358
trigger="manual"

ui/src/components/dynamics-form/index.vue

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -141,6 +141,17 @@ watch(
141141
},
142142
{ deep: true },
143143
)
144+
145+
watch(
146+
() => props.modelValue,
147+
(val) => {
148+
if (!val) return
149+
if (_.isEqual(val, formValue.value)) return
150+
formValue.value = _.cloneDeep(val)
151+
},
152+
{ deep: true },
153+
)
154+
144155
function renderTemplate(template: string, data: any) {
145156
return template.replace(/\$\{(\w+)\}/g, (match, key) => {
146157
return data[key] !== undefined ? data[key] : match

0 commit comments

Comments
 (0)