This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!-- Component Markup --> | |
<div aura:id="yourIdentifier"> | |
<c:Your_Component /> | |
</div> | |
/** | |
* Controller Method | |
*/ | |
showComponent : function (component, event, helper) { | |
$A.util.removeClass(component.find("yourIdentifier"), "slds-hide"); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<aura:attribute name="selectOptions" type="object[]" description="A list of objects with value (ID) and text (label) attributes"/> | |
<aura:attribute name="selectedOption" type="ID" default="" description="The value of the selected option"/> | |
<lightning:select name="selectName" label="My Select" value="{!v.selectedOption}" onchange="{!c.doSomething}" required="true"> | |
<aura:iteration items="{!v.selectOptions}" var="option"> | |
<option value="{!option.value}" selected="{!if(v.selectedOption==option.value,'selected','')}">{!option.text}</option> | |
</aura:iteration> | |
</lightning:select> |
NewerOlder