0👍
Bind your currentSearchInput
to the input using v-model. You do not need saveInput
at all.
<input v-model='currentUserInput' type="text" />
{{currentSearchInput}} {{currentSearchInput.length}}
setText() {
this.message = this.currentSearchInput;
},
Your code has currentSearchInput
and currentUserInput
. Typo?
0👍
Yes, I agree with Steven. Don’t need to use saveInput
function. Just use v-model="currentUserInput" and then when clicking the button, just set like that;
setText() {
this.message = this.currentUserInput;
},
- [Vuejs]-Issue with Api call, not returning any response in Vuejs?
- [Vuejs]-Problems sending only the value of a select using typescript
Source:stackexchange.com