You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Sep 4, 2024. It is now read-only.
Changing the approach to how this directive is implemented may make it work better with custom input components.
Rather than reply on the v-model (and firing input events, which may not always be the event used in a custom component), binding to the elements native input event, grabbing the current value via evt.target.value and formatting it, then setting the value via evt.target.valuemight make this directive more robust.
One can check if they are on a custom component by checking if el has the el.__vue__ property, and if so, then trigger the 'vue' input event el.__vue__.$emit('input', evt.target.value).
Adding a modifier to the direction to set which event is fired would be good as well (i.e. input or change)
The text was updated successfully, but these errors were encountered:
Hi, @tmorehouse
Thanks for pointing this.
The version prior to v1.1.0 was implemented similar way. But it was really buggy. If you can create minimum valuable working example, I would like to take a look
Changing the approach to how this directive is implemented may make it work better with custom input components.
Rather than reply on the
v-model
(and firinginput
events, which may not always be the event used in a custom component), binding to the elements nativeinput
event, grabbing the current value viaevt.target.value
and formatting it, then setting the value viaevt.target.value
might make this directive more robust.One can check if they are on a custom component by checking if
el
has theel.__vue__
property, and if so, then trigger the 'vue'input
eventel.__vue__.$emit('input', evt.target.value)
.Adding a modifier to the direction to set which event is fired would be good as well (i.e.
input
orchange
)The text was updated successfully, but these errors were encountered: