+ Start a Discussion

Update Attribute on Parent from Chile

I have a parent component that itterates using a child attribute.  I have passed the value to the child and in the child code I want to update the parents attribute.  I thought the attribute would update based on what I have but its not.  Any help would be greatly appreciated!  Here is what I have.  Its the cloning attribute I want to update.   (I stripped out the code that was not relevant)
Parent component:
<!-- attribute used to Toggle when Cloning  -->
    <aura:attribute name="cloning" type="boolean" default="false"/>
<aura:if isTrue="{!v.cloning}">       
         <lightning:layoutItem padding="horizontal-medium" size="12">  
            <!-- Iterate over the list of Group Structures and display them -->
            <aura:iteration var="NGS" items="{!v.newGroupsStructures}">
                  <c:GroupStructures newGroupStructures="{!NGS}" cloning="{!v.cloning}" groupstructure="{!v.groupstructures}"/>

Here is the sub component:
        //set the variable to cloning to update the page 
        var cloneTrue = "True"; 
          component.set("v.cloning", cloneTrue);