change handler doesn't work when the attribute is a list which can be updated an aura:iteration.
In the following example, we never go to controller method itemsChange ( except at the init) whereas the attribute value is well updated, as you can see in the console when you click on "click me".
Related doc: https://developer.salesforce.com/docs/atlas.en-us.lightning.meta/lightning/ref_aura_valueChange.htm
Snippet to reproduce with 2 copy/paste :
App :
<aura:attribute name="SomeList" type="Object[]" />
<aura:handler name="change" value="{!v.SomeList}" action=" {!c.itemsChange}"/>
<aura:iteration items="{!v.SomeList}" var="ListItem">
<c:CmpInputText value="{!ListItem.SomeVal}" />
</aura:iteration>
<a onclick="{!c.clickMe}">CLICK ME</a>
</aura:application>
Controller:
({
doInit : function(component, event, helper) {
var SomeList = [
{'SomeVal': 'INITIAL'},
{'SomeVal': 'VALUES'},
{'SomeVal': 'HERE'}
] ;
component.set('v.SomeList',SomeList);
console.debug('INIT VALUES' + JSON.stringify(component.get('v.SomeList')));
},
clickMe : function(component, event, helper) {
console.debug('AFTER CLICK '+JSON.stringify(component.get('v.SomeList')));
} ,
itemsChange : function(component, event, helper) {
alert('SomeList has changed');
console.debug('ONCHANGE :'+ JSON.stringify(component.get('v.SomeList'),null,2));
}
})
itemsChange
method will be called when you docomponent.set('v.SomeList',SomeList);
in the doInit. I checked it in my org, it works as expected.