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

@vue/compat input type=radio value=false via Boolean not in DOM #11747

Closed
estberg opened this issue Aug 29, 2024 · 3 comments
Closed

@vue/compat input type=radio value=false via Boolean not in DOM #11747

estberg opened this issue Aug 29, 2024 · 3 comments

Comments

@estberg
Copy link

estberg commented Aug 29, 2024

Vue version

3.4.38

Link to minimal reproduction

https://stackblitz.com/edit/vitejs-vite-7cf2eb?file=src%2Fcomponents%2FRadioButton.vue

Steps to reproduce

  1. Run the dev server
  2. In dev tools, see that the input does not have any value attribute

What is expected?

value="false" should be on the input

What is actually happening?

Value seems to be dropped somewhere

System Info

System:
    OS: Linux 5.0 undefined
    CPU: (8) x64 Intel(R) Core(TM) i9-9880H CPU @ 2.30GHz
    Memory: 0 Bytes / 0 Bytes
    Shell: 1.0 - /bin/jsh
  Binaries:
    Node: 18.20.3 - /usr/local/bin/node
    Yarn: 1.22.19 - /usr/local/bin/yarn
    npm: 10.2.3 - /usr/local/bin/npm
    pnpm: 8.15.6 - /usr/local/bin/pnpm
  npmPackages:
    vue: 3.4.38 => 3.4.38

Any additional comments?

Note: it is not recommended that Boolean type is used as the value for a radio input and it should probably just be a String. However this is something that Vue should handled for us and without compat it does show up (see SFC playground).

@Obinna-Nwankwo
Copy link

//Check well if this issue is in the latest Vue version//
//add any release candidates or beta versions//

const selectedValue = ref(false)

watch(selectedValue, (newValue) => {
console.log('Selected value changed:', newValue)
})

@edison1105 edison1105 added 🐞 bug Something isn't working scope: v2 compat labels Aug 30, 2024
@edison1105
Copy link
Member

edison1105 commented Aug 30, 2024

@edison1105 edison1105 removed 🐞 bug Something isn't working scope: v2 compat labels Aug 30, 2024
@Obinna-Nwankwo
Copy link

Obinna-Nwankwo commented Sep 6, 2024 via email

@edison1105 edison1105 closed this as not planned Won't fix, can't repro, duplicate, stale Sep 7, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants