You need to sign in to do that
Don't have an account?
Smitha Sirivolu 10
How to activate the method onSubmit in < lightning:button onclick="{!c.onSubmit} /> when ENTER Key is Pressed
How to activate the method onSubmit in < lightning:button onclick="{!c.onSubmit} /> when ENTER Key is Pressed
in Aura components development
in Aura components development
You can wrap your content (where you want to detect the key press) in a div and use onkeyup event. Check if the pressed key is `enter` and call submit.
Something similar to this: