You need to sign in to do that
Don't have an account?
Michael_Mantouvalos
How to submit data from component to JScontroller, when pressing anywhere outside of the text input field
Hi all,
I have some text input fields in an aura component.
i.e:
<lightning:input type="text" label="Name" id="text-input-id1" value="{!v.name}"/>
The idea is to submit the text on js controller when pressing anywhere outside of the input field it self.
Something similar to this event : onClick = "{!c.handleClick}" ,but when pressing outside the input field. (or pressing tab to go to the next one)
Is there something i could do? I have searched everywhere with zero luck.
Thank you!!
>> https://developer.salesforce.com/docs/component-library/bundle/lightning:input/specification
I have not found any such examples as such but as per the documentation in the above link for lightning:input tag I see there is oncommit for which the description is: "The action triggered when the user finishes changing the input value. For example, pressing Enter, navigating away from the input element, clearing a search" pressing Enter is mentioned I think you can try this.
Let me know if it helps you and close your query by marking it as solved so that it can help others in the future.
Thanks.
All Answers
>> https://developer.salesforce.com/docs/component-library/bundle/lightning:input/specification
I have not found any such examples as such but as per the documentation in the above link for lightning:input tag I see there is oncommit for which the description is: "The action triggered when the user finishes changing the input value. For example, pressing Enter, navigating away from the input element, clearing a search" pressing Enter is mentioned I think you can try this.
Let me know if it helps you and close your query by marking it as solved so that it can help others in the future.
Thanks.