You need to sign in to do that
Don't have an account?
Ming Ma
Input onchange event doesn't fire inside aura:iteration
Hi,
I have a lightning:input base component inside a aura:iteration. This input has a onchange attribute. but the onchange event doesn't fire inside aura:iteration. Is this a bug?
Please see the code below.
Thanks.
<aura:iteration items="{!v.items}" var="item" indexVar="index">
<lightning:input class="slds-form-element slds-size_1-of-4" type="number" label="Current value" name="Current value" formatter="currency" value="{!item.CurrentValue__c}" onchange="{!c.updateTotal}"/>
</aura:iteration>
I have a lightning:input base component inside a aura:iteration. This input has a onchange attribute. but the onchange event doesn't fire inside aura:iteration. Is this a bug?
Please see the code below.
Thanks.
<aura:iteration items="{!v.items}" var="item" indexVar="index">
<lightning:input class="slds-form-element slds-size_1-of-4" type="number" label="Current value" name="Current value" formatter="currency" value="{!item.CurrentValue__c}" onchange="{!c.updateTotal}"/>
</aura:iteration>
Ming Ma
I got it working. I had to add a ui:inputNumber with change event. After that onchange event started working on lightning:input. It continues to work after I removed ui:inputNumber. Not sure if this a caching issue or a salesforce bug.