Skip to content

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

Closed as not planned
@estberg

Description

@estberg

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).

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions