-
-
Notifications
You must be signed in to change notification settings - Fork 33.8k
Allow ternary v-bind:type with v-model. #6158
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
Comments
I suppose this is supported. |
Whoops, sorry, missed that. |
Oh, check the console, we have |
When switching input types between |
@javoski, P.S. |
Another way to do this clearly at current release, is to avoid ternary, for example: As was written at some VueJS CodeStyle Guide, it;s better to try to use simple expressions at components attributes and move complex ones to a callback functions |
We will likely support full dynamic type for |
What problem does this feature solve?
There is common "Show Password" pattern today and we have to use v-if/v-else for that. Can we consider allowing ternary expression that returns only one of
text,number,password,search,email,tel,url
allowed inv-bind:type
?What does the proposed API look like?
The text was updated successfully, but these errors were encountered: