Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

USelect converts null, true, false and int to string #2903

Open
projct1 opened this issue Dec 14, 2024 · 2 comments
Open

USelect converts null, true, false and int to string #2903

projct1 opened this issue Dec 14, 2024 · 2 comments
Assignees
Labels
bug Something isn't working needs reproduction v3 #1289

Comments

@projct1
Copy link

projct1 commented Dec 14, 2024

Environment

Is this bug related to Nuxt or Vue?

Nuxt

Version

3.14.1592

Reproduction

<script setup lang="ts">
const model = ref(true)
const yesNoList = [
  {
    label: '-',
    value: null
  },
  {
    label: 'No',
    value: false
  },
  {
    label: 'Yes',
    value: true
  }
]
</script>

<template>
    <USelect v-model="model" :items="yesNoList" class="w-24" />
</template>

Description

On select item model value converts from null to "", true to "true" etc.
https://skr.sh/vTBGJYo8U6P

@romhml
Copy link
Collaborator

romhml commented Jan 6, 2025

I'm not able to reproduce the issue using the latest version of the devtools and Nuxt UI:
https://codesandbox.io/p/devbox/nuxt-ui3-forked-ghcdsd

Can you confirm the issue is solved or share a reproduction?

@yschroe
Copy link

yschroe commented Jan 11, 2025

I think this is an upstream issue in Reka UI, see: unovue/radix-vue#1517

I have the same issue in v3-alpha.10 and can confirm that this issue does not appear, if the USelect is used outside of a Form.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working needs reproduction v3 #1289
Projects
None yet
Development

No branches or pull requests

3 participants