-
Notifications
You must be signed in to change notification settings - Fork 988
Closed
Labels
Description
Environment
- Operating System: Linux
- Node Version: v22.4.0
- Nuxt Version: 3.16.2
- CLI Version: 3.25.0
- Nitro Version: 2.11.9
- Package Manager: [email protected]
- Builder: -
- User Config: css, app, modules, imports, compatibilityDate, sanctum, fileStorage, ssr
- Runtime Modules: @nuxt/[email protected], @nuxtjs/[email protected], [email protected], @vueuse/[email protected], [email protected], @nuxtjs/[email protected]
- Build Modules: -
Is this bug related to Nuxt or Vue?
Nuxt
Version
Nuxt UI version 3.0.2
Reproduction
<script setup lang="ts">
const model = defineModel()
const query = ref('')
const items = ref([])
const isOpen = ref(false)
const isLoading = ref(false)
const search = useDebounceFn(async () => {
if (query.value.length > 1) {
isLoading.value = true
items.value = (await fetchApi('categories?q=' + query.value)).data
isLoading.value = false
}
}, 250)
function create(name) {
model.value = { name: name.trim() }
query.value = ''
isOpen.value = false
}
</script>
<template>
<USelectMenu v-model="model"
v-model:open="isOpen"
v-model:search-term="query"
:items="items"
:loading="isLoading"
label-key="name"
create-item="always"
@create="create"
@update:search-term="search" />
</template>Description
I want to create new category "Des", but cant, because i found "Deserts".
Option create-item="always" ignored.
Demonstration: https://skr.sh/vVFQ3lvSifh