Skip to content

Wht is QInput emitting empty string for number inputs when manually cleared? #17895

Discussion options

You must be logged in to vote

vuejs/vue#4742
vuejs/core#3378
vuejs/core#8214
vuejs/core#8215

https://vuejs.org/guide/essentials/forms.html#number

If the value cannot be parsed with parseFloat(), then the original (string) value is used instead. In particular, if the input is empty (for instance after the user clearing the input field), an empty string is returned. This behavior differs from the DOM property valueAsNumber.

This is how Vue behaves unfortunately 🤷 I don't think it will get fixed before Vue 4, if it ever gets fixed.

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@ivanjaros
Comment options

Answer selected by ivanjaros
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
2 participants