Open
Description
Vue version
3.4.32+
Link to minimal reproduction
Steps to reproduce
Use defineModel
with a modifier like trim
applied in the set
transformer. Bind the model to a text input and type a multi-word value into the input.
What is expected?
The trim modifier syncs the trimmed value back to the parent without updating the value
attribute on the input.
What is actually happening?
The input value is also updated to the trimmed value, which prevents a user from adding spaces.
System Info
No response
Any additional comments?
Looking at commit de174e1 this may now be the expected behavior, but is a bit unintuitive given how v-model modifiers have worked in the past.
The documentation on modifiers and transformers appears to suggest that you should be able to apply a trim modifier in this manner.