-
Notifications
You must be signed in to change notification settings - Fork 100
Open
Labels
activeThis issue is currently activeThis issue is currently activeinvestigatinginvestigatinginvestigatingwaiting on responsewaiting on responsewaiting on response
Description
Describe the bug
I am seeing an error when the binding value is modified in the parent component's init handler.
To Reproduce
- create a test lightning App
Testapp.app
<aura:application extends="force:slds">
<aura:attribute name="buttonLabel" type="String" default="Neutral"/>
<aura:handler name="init" value="{!this}" action="{!c.initHandler}"/>
<!-- create following button component using Force-DI -->
<!-- <lightning:button label="Neutral"></lightning:button> -->
<c:di_injector bindingName="lc_button">
<c:di_injectorAttribute name="label" value="{!v.buttonLabel}"/>
</c:di_injector>
</aura:application>
TestappController.js
({
initHandler : function(cmp, evt, helper) {
cmp.set('v.buttonLabel', 'brand');
}
})
- create custom metadata
di_Binding.lc_button
<?xml version="1.0" encoding="UTF-8"?>
<CustomMetadata xmlns="http://soap.sforce.com/2006/04/metadata" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<label>lc_button Binding</label>
<protected>false</protected>
<values>
<field>BindingObjectAlternate__c</field>
<value xsi:nil="true"/>
</values>
<values>
<field>BindingObject__c</field>
<value xsi:nil="true"/>
</values>
<values>
<field>BindingSequence__c</field>
<value xsi:nil="true"/>
</values>
<values>
<field>To__c</field>
<value xsi:type="xsd:string">lightning:button</value>
</values>
<values>
<field>Type__c</field>
<value xsi:type="xsd:string">LightningComponent</value>
</values>
</CustomMetadata>
Steps to reproduce the behavior:
- Create a scratch org & deploy force-di package
- create lightning app & custom metadata as mentioned
- preview the app - /c/Testapp.app
Expected behavior
No error expected.
Screenshots and text of error observed
Version
Did you try to reproduce the problem against the latest force-di code? yes
Metadata
Metadata
Assignees
Labels
activeThis issue is currently activeThis issue is currently activeinvestigatinginvestigatinginvestigatingwaiting on responsewaiting on responsewaiting on response