-
Notifications
You must be signed in to change notification settings - Fork 27
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
Warning if v-model is empty or becomes empty #22
Comments
Hi, Thnank you for reporting anyway |
"vue-contenteditable": "^4.0.4" "vite": "^3.0.4" |
I am getting the same warning. If I entirely delete the contents of a
|
I can reproduce too. Since it's only a warning and does not seem to affect the usability of the lib, I tagged as enhancement |
Also, getting this, any news? |
@hl037 I just looked a bit into this. const emit = defineEmits({
'returned' : String,
'update:modelValue' : String,
}); Causing vue to call String() with the empty value, which then returns an empty string to the validator instead of true/false causing the warning. const emit = defineEmits(['returned', 'update:modelValue']); Or with typescript: const emit = defineEmits<{
(e: 'update:modelValue', value: string): void;
(e: 'returned', value: string): void;
}>(); Or specifying a true validator as described here: https://vuejs.org/guide/components/events.html#events-validation |
Hello,
I'm getting this warning if I click on a contenteditable div and click outside without having typed anything.
[Vue warn]: Invalid event arguments: event validation failed for event "update:modelValue".
my v-model points to a ref("")
It also shows as soon as the v-model goes back to an empty string (when I erase the string for example)
Thank you for this plugin it's very convenient!
The text was updated successfully, but these errors were encountered: