-
-
Notifications
You must be signed in to change notification settings - Fork 33.8k
Closed
Labels
Description
Version
2.5.0
Reproduction link
https://jsfiddle.net/nkovacs/rt9vcrj2/3/
Steps to reproduce
If you use a dynamic type on an input, and the property is not called type
, you'll get this warning:
vue.js:491 [Vue warn]: Property or method "type" is not defined on the instance but referenced during render. Make sure that this property is reactive, either in the data option, or for class-based components, by initializing the property. See: https://vuejs.org/v2/guide/reactivity.html#Declaring-Reactive-Properties.
(found in <Root>)
And it won't work if you switch from a normal type like text to a checkbox or radio button (the special types that are in the else branch: f3fe012#diff-6eaa1698ef4f51c9112e2e5dd84fcde8R4)
Click the button (Click me) to switch the input to a checkbox, then try checking and unchecking the box. The model's value will not change.
Calling the property type
works, the model's value will change: https://jsfiddle.net/nkovacs/rt9vcrj2/2/
What is expected?
Dynamic input type should work regardless of the property name.
What is actually happening?
Dynamic input type only works if the property is called type
meteorlxy