Skip to content

v-model.number does not work for radio buttons #10886

Open
@screendriver

Description

@screendriver

Vue version

3.4.25

Link to minimal reproduction

https://play.vuejs.org/#eNqVkk1LAzEQhv9KyKUKdZeqp7ItqPSgBxX1mMu6nW1T80U+amXZ/+5MamsPsuAlZN73yfDOkI7fOFdsE/Apr0LjpYssQExuLozUzvrIOuahZT1rvdVshOhIGGEaa0JkEfCYEXB2LkxV7jvgWywiaKfqCFgxVq0n867b833P6PrlwLYHpSoRyKA0LmFjdGeC+3opreBsW6tE9YTuF9ouQRUm6XfwKFIL1E2tCfmpSgoRh7td/qtbVZ5MxMc8BtxBK1fFJliD6+sovuCN1U4q8E8uStyR4FOWHfJqpeznQ9aiTzA+6M0amo8/9E3YkSb4s4cAfguCH71Y+xVgNrIXr4+ww/vRxJmSQnrAfIFgVaKMe+w2mSXGPuFy2vv8CaRZvYXFLoIJh6EoKJF95gXHj3E3MPpv3KviOr8Tpuf9N4sK1cE=

Steps to reproduce

  • declare radio buttons with values that can be parsed as number
  • add a ref() and bind the radio buttons with v-model.number to it

What is expected?

The value of the ref should be of type number.

What is actually happening?

It is always of type string (tested in Chrome and Firefox.)

System Info

No response

Any additional comments?

No response

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions