Skip to content

Commit 9cf08f1

Browse files
committed
fix: close suggestions in the input component when a suggestion is submitted
1 parent 1f9b1e6 commit 9cf08f1

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

src/components/LibInput/LibInput.vue

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -314,6 +314,10 @@ const suggestionProps = computed(() => ({
314314
modelValue: modelValue.value,
315315
inputValue: inputValue.value,
316316
canOpen: canOpen.value,
317+
onSubmit: (e: T) => {
318+
canOpen.value = false
319+
emits("submit", e)
320+
},
317321
// eslint-disable-next-line @typescript-eslint/naming-convention
318322
"onUpdate:isOpen": (e: boolean) => { isOpen.value = e },
319323
"onUpdate:isValid": updateIsValid,

0 commit comments

Comments
 (0)