function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
Ming MaMing Ma 

Input onchange event doesn't fire inside 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.


<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}"/>
Ming MaMing 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.