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.

5
  • 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 . Nov 19, 2015 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, 2015 at 0:38
  • You can create event though and bubble up the event . Nov 19, 2015 at 1:03
  • Found somewhat related question: salesforce.stackexchange.com/questions/80142/…
    – dzh
    Nov 19, 2015 at 1:27
  • There is aura:method now if you want to check that Nov 19, 2015 at 2:00

1 Answer 1

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 .

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .