I have a form with input values. When I have a select with a v-model on it and go to change the drop down value, the input from the previous fields clear. I made a simple codepen
Solution 1:
I had the same problem, and for me the problem was that I saved the value of the text input in a prop, but it should be saved in the data method.
So the element looks like:
<input v-model="value"/>
End then in the script part:
data() {
return {
value: ''
}
}
Share
Post a Comment
for "Vue: Select Dropdown Is Clearing Other Inputs When Changing Value"
Post a Comment for "Vue: Select Dropdown Is Clearing Other Inputs When Changing Value"