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

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

Closed
dasdeck opened this issue Dec 21, 2017 · 1 comment
Closed

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

dasdeck opened this issue Dec 21, 2017 · 1 comment

Comments

@dasdeck
Copy link

dasdeck commented Dec 21, 2017

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!

@posva posva changed the title check Dynamic type coming from v-bind is ignored by v-model Dec 21, 2017
@posva
Copy link
Member

posva commented Dec 21, 2017

Changed the title from check to Dynamic type coming from v-bind is ignored by v-model

lovelope pushed a commit to lovelope/vue that referenced this issue Feb 1, 2018
f2009 pushed a commit to f2009/vue that referenced this issue Jan 25, 2019
aJean pushed a commit to aJean/vue that referenced this issue Aug 19, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants