I have a Lightning component where I am capturing a text field from user in below format
<lightning:input aura:id="reason" type="text" name="reason" value="{!value}" onchange="{!c.updateOtherReason}" required="true"/>
The Submit button is enabled based on the value of this field + few other fields when they are not empty. only first time the submit button is enabled by default, after that only when field has value the button enables and if you clear the value button disables, this is handled via onchange event.
Now my concern is, my onchange function which validates the input will be called for every character entry. would it impact the performance of my component even though I don't have any controller calls in the onchange logic.
i tried adding a 3 Sec time out, but sometimes its acting weird as its reset my error if i submit immediately after clearing value. Is there any other way so that onchange can be called once the users enter couple of words