seems I have found a bug which prevents data binding in case of arrayed Maps. Maybe you can help me how to get around this. I have a list of Custom Objects, I iterate over. Each of the components, I pass the custom Object and a map:

"Id1": [{Name: "Id1: test"},{Name: "Id2: test2"}],
"Id2": [{Name: "test3"}]

The Name value is passed via a component.getReference to a subcomponent: component.getReference("v.map."+Id+"[0].Name").

When I change the value of Name in the subcomponent, this is not reflected in the rendering of the other subcomponent. javascript is totally aware of the changed value (i.e. I can check with a console.log), but if I draw the Name value on every component (via a hardbinded Id --> {!v.map.Id1[0].Name}) I can see, that it only updates within the specific subcomponent, but the parent and all other Childs of the parent are not updated automatically. In case of basic datatypes (e.g. a boolean value) all objects get updated accordingly with the specific value.

You can find the semi-automatic updated binding in both screenshots. "test" is the init value: rendering after init rendering after changing the referenced value

Is there a way around this? Can we enforce a render/data-binding update? This might be a bit complicated, so please let me know if you need a concrete example.

Thanks, Nico

  • A self-contained example would be useful, if you can write a small short one that we could use to get a better idea. – sfdcfox Nov 11 '18 at 15:40
  • meanwhile, I have found the following known issue: success.salesforce.com/issues_view?id=a1p3A0000018B6LQAU. you can use the example there. The problem is, that a button is not really applicable in my case, because I want to automatically change it based on the input of a data field... – nico525 Nov 11 '18 at 18:16

Your Answer

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

Browse other questions tagged or ask your own question.