-
-
Notifications
You must be signed in to change notification settings - Fork 262
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
[Vue plugin] _updateValue is called on init, marking the inputs "dirty" with validators #989
Comments
hi @TheDutchCoder, i don't see any |
@uNmAnNeR here:
|
@TheDutchCoder it's not exposed by default. The default option for vue3 is component3-composition. Does not it work in your case? I want to remove |
@uNmAnNeR it is, it's called in |
So when the component mounts, it calls |
hi @TheDutchCoder, i've checked it once again. To me it seems correct that mask emits |
I don't think that callback check works with v-models. 🤷 I'm not entirely sure what you mean by "because value can be changed when mask is applied". Isn't that just handled pre-mount for the Vue component? Anyway, a non-touched input should not emit an event, it pretty much goes against the browser implementation of how input events are handled. I think we'll have to find an alternative library then. |
@TheDutchCoder hi, thanks for the feedback.
sure it does not
yes it is and there is no silver bullet to fix it. In touched but notified vs untouched & silent i prefer to be explicit.
it does mean that if initial input value was "A" and after mask is applied it becomes "B" then event should be emitted even if user does not touch the input.
i believe it should if the value is changed
you are always welcome |
I agree, but it fires when the value hasn't changed initially, that's the problem. |
@TheDutchCoder i will check |
@TheDutchCoder can you check |
Describe the bug
Because the _updateValue method is called on component init, validators will mark the input as "dirty" (since a value is emitted). I don't really see a reason to emit a value on mount, it shouldn't have to do this.
Expected behavior
No value to be emitted on init, specially not if it didn't change from the passed in value.
Environment:
The text was updated successfully, but these errors were encountered: