I am dealing with an input field that is set up like this:
<input type="text" name="avr" value="{{ arv | currency}}" v-model="arv | currency">
The corresponding data model is defined as follows:
data: {
avr: '',
}
To populate the data, a request is made in the ready
function like so:
this.arv = this.meta[i].metadata_value;
While everything seems to be functioning correctly and the correct value is displayed in the input field, I am facing an issue where clicking on the input field clears out the number completely. This behavior is not desired, as users should be able to simply click and change a number without losing the existing value.
If I remove v-model="arv | currency"
, the input field behaves as expected, but then my Watch
function stops working properly.