Skip to content

Dynamic type coming from v-bind is ignored by v-model #7296

@dasdeck

Description

@dasdeck

Version

2.5.13

Reproduction link

https://codepen.io/dasdeck/pen/ZvOKqm?editors=1010

Steps to reproduce

set the input type via v-bind like in the codepen and use the checkbox to change the bound value.

What is expected?

the checkbox will control the value assigned in v-model

What is actually happening?

the value is not changed.


It seems to me that the v-bind is evaluated after v-model, thus the input is always a "textbox" e.g. the default and therefore can not be bound properly and only works for textbox and related input types. In comparison the :type="variableType" works just fine. See :
https://codepen.io/dasdeck/pen/RxRvow?editors=1010

Also it worked in Vue 1.x.
This might be expected behaviour, but I could not find it mentioned anywhere.

Cheers!

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