I have an Aura component with an
aura:iteration that each iteration generates a
lightning:formattedNumber, a hidden
lightning:input (both for the same field), and a
lightning:buttonIcon that calls a controller method that hides the first and shows the second one.
I want to show and focus the
lightning:input after I click the button, but I'm not able to use the
.focus() method, because I can't get the component with
.find(), since It seems I can't dynamically set
Also, I tried to use a parent
span with an
id to access the
input tag generated by the
lightning:input with something like
document.querySelector('#myDynamicIdValue input'), but it returns only
How could I focus this input?