Vue.directive not working with InputText
Posted: 30 May 2020, 23:33
I have a problem when i am using a directive with InputText.
It is not working.
I am using the follow code:
Vue.directive('uppercase', {
update (el) {
el.value = el.value.toUpperCase()
},
})
<InputText type="text" v-model="valueSearch" v-uppercase />
When i use the simple input like the code below, it work:
<input v-model="valueSearch" v-uppercase/>
Are there someone with the same problem to help me ?
Thanks.
It is not working.
I am using the follow code:
Vue.directive('uppercase', {
update (el) {
el.value = el.value.toUpperCase()
},
})
<InputText type="text" v-model="valueSearch" v-uppercase />
When i use the simple input like the code below, it work:
<input v-model="valueSearch" v-uppercase/>
Are there someone with the same problem to help me ?
Thanks.