Having trouble getting this to work. This is what I have:
<aura:component implements="flexipage:availableForRecordHome,force:hasRecordId"
access="global"
controller="RequirementsUX">
<aura:attribute name="LeadRecord" type="object"/>
<!-- aura attributes to store data/values -->
<aura:attribute name="ListCivilWork" type="List"/>
<aura:attribute name="ListSiteServiceNeededfor" type="List"/>
<aura:attribute name="CivilWork" type="String"/>
<aura:attribute name="SiteServiceNeededfor" type="String"/>
<div> Site Services / Civil Work </div>
<lightning:layout multipleRows="true">
<lightning:layoutItem size="12" mediumDeviceSize="12" padding="around-small">
<aura:iteration items="{!v.ListCivilWork}" var="CiWrk">
<lightning:button variant="{!if(CiWrk.isSelected == true,'brand','brand-outline')}" label="{!CiWrk.value}" name="{!CiWrk.value}" title="Neutral action" onclick="{!c.cwButton }" disabled="{!v.disablepicklistvalues}"/>
</aura:iteration>
</lightning:layoutItem>
</lightning:layout>
<aura:if isTrue="{!v.ListCivilWork == 'true'}">
<div> Site Service Needed for? </div>
<lightning:layout multipleRows="true">
<lightning:layoutItem size="12" mediumDeviceSize="12" padding="around-small">
<aura:iteration items="{!v.ListSiteServiceNeededfor}" var="SSNF">
<lightning:button variant="{!if(SSNF.isSelected == true,'brand','brand-outline')}" label="{!SSNF.value}" name="{!SSNF.value}" title="Neutral action" onclick="{!c.ListSSNFButtons}" disabled="{!v.disablepicklistvalues}"/>
</aura:iteration>
</lightning:layoutItem>
</lightning:layout>
</aura:if>
CivilWork is a check box, but its displayed in the component as buttons. Button names are true and false.
When true is clicked, Site Service Needed for section below should show and when false is clicked that section should hide.