When working with @input on an input field in Vue.js, I am facing an issue where the assigned function is only called after the user has stopped typing and the focus is out of the input field. Essentially, it is triggered on onFocusout. What I actually want is for the function to be called while the user is typing.
Here is the code snippet:
<input
v-model="inputValue"
type="text"
:placeholder="placeholder"
:class="['w-full !border-none !focus:border-none p-2.5 shadow-none', disabled ? 'text-[#969c9f]' : 'black']"
@input="ValidateInput"
:disabled="disabled"
/>
ValidateInput(){
// Validation logic goes here
}
As a newcomer to Vue.js, I am seeking guidance on how to address this issue. I have tried multiple approaches but none have proved successful.