1

Say I have multiple components nested under each other, one takes collection of Accounts, the component under Account takes a collection of Contacts.

Say I want to programmatically remove one of the Contacts, so I do it by removing it from grandparent component collection. Will it trickled down and remove it from UI? If I add new one, will it display a new one? How about modifying the fields.

Also, if I modify the Contact name, will the object on grandparent component have that field updated?

Thank you.

  • Aura:iterable is definitely reactive .Aura iterable binds with the collection attribute defined .If data from the array is removed ,the UI immediately reflects the change just as it is with angular $Scope. If you want your changes to propagate to server then you make call to @auraEnabled method .Its two way blinded with the attribute . – Mohith Shrivastava Nov 19 '15 at 0:25
  • Thanks, was experimenting just now and one interesting case came out. Updating children does not trigger parent aura:handler for the collection. – dzh Nov 19 '15 at 0:38
  • You can create event though and bubble up the event . – Mohith Shrivastava Nov 19 '15 at 1:03
  • Found somewhat related question: salesforce.stackexchange.com/questions/80142/… – dzh Nov 19 '15 at 1:27
  • There is aura:method now if you want to check that – Mohith Shrivastava Nov 19 '15 at 2:00
1

Aura:iterable is definitely reactive .Aura iterable binds with the collection attribute defined .If data from the array is removed ,the UI immediately reflects the change just as it is with angular $Scope.

If you want your changes to propagate to server then you make call to @auraEnabled method .Its two way blinded with the attribute .

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.