dev: hotfix, my-ui/combobox v-model

This commit is contained in:
2025-12-03 09:45:41 +07:00
parent 9a8ee9d90f
commit b80ee5a55e
@@ -1,6 +1,5 @@
<script setup lang="ts">
import { cn } from '~/lib/utils'
import { type Item } from './index'
const props = defineProps<{
@@ -14,6 +13,8 @@ const props = defineProps<{
isDisabled?: boolean
}>()
const model = defineModel()
const emit = defineEmits<{
'update:modelValue': [value: string]
'update:searchText': [value: string]
@@ -57,6 +58,7 @@ const searchableItems = computed(() => {
})
function onSelect(item: Item) {
model.value = item.value
emit('update:modelValue', item.value)
open.value = false
}