You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
// will trigger typescript error on v-model
<USelectMenu
v-model="memberForm.user"
:items="addableUsers"
label-key="email"
/>
// will trigger typescript error on v-model
<USelectMenu
v-model="memberForm.user"
:items="addableUsers"
label-key="email"
:value-key="undefined"
/>
// will work but i need to handle label display manually using slot
<USelectMenu
v-model="memberForm.user"
:items="addableUsers"
/>
Description
I'm currently migrate my project to NuxtUi V3 and I have some issues with <UInputMenu /> and <USelectMenu />. On my selects I want to retrieve the full object selected so I don't set value-key but for display purpose I use the label-key props, however when I do this I get this typescript error on the v-model :
Unable to assign type 'User | undefined' to type 'string | undefined'.
Unable to assign type 'User' to type 'string'. ts-plugin(2322)
After some research, I think the label-key alter the value-key type and that's what triggers the error.
Additional context
No response
Logs
The text was updated successfully, but these errors were encountered:
Wow thanks for your reactivity guys !
Is there an expected date for this fix ?
Actually we use <!-- @vue-ignore --> to pass the typecheck but that's not really safe 😅
Environment
Is this bug related to Nuxt or Vue?
Nuxt
Version
v3.0.1
Reproduction
Description
I'm currently migrate my project to NuxtUi V3 and I have some issues with
<UInputMenu />
and<USelectMenu />
. On my selects I want to retrieve the full object selected so I don't setvalue-key
but for display purpose I use thelabel-key
props, however when I do this I get this typescript error on thev-model
:After some research, I think the
label-key
alter thevalue-key
type and that's what triggers the error.Additional context
No response
Logs
The text was updated successfully, but these errors were encountered: