function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
Manoj BadamManoj Badam 

Need help in rerender the input rich text area on lightning based on the picklits value select

I am trying to rerender the input rich text area on lightning based on the picklits value select .. but its not working .. can any one help me ? 
Best Answer chosen by Manoj Badam
Raj VakatiRaj Vakati
Are you fethchind data from the server or simply rendering .. .


You need to use aura:if for conditional rendering  ,, see the below sample code.. 
 
<aura:component implements="forceCommunity:availableForAllPageTypes,force:appHostable,flexipage:availableForRecordHome">
    <aura:attribute name="colors" type="String[]" default="Red,Green,Blue"  />
    <aura:attribute name="selectedValu" type="String"  />
    
    <lightning:select name="select" label="Select a Color"  value="{!v.selectedValu}" required="true" onchange="{! c.onChange }">
        <aura:iteration items="{!v.colors}" var="color">
            <option text="{!color}"></option>
        </aura:iteration>
    </lightning:select>
    Value:a  {!v.selectedValu}
    
    
    <aura:if isTrue="{!v.selectedValu =='Red'}">
        
        <div class="slds-form-element__control">
            <ui:inputTextArea aura:id="comments" label="Comments"  value="My comments" rows="5"/>
        </div>
    </aura:if>
    
</aura:component>
 
({
    onChange: function (cmp, evt, helper) {
        console.log('askdjahsd'+cmp.find('select').get('v.value') );
        cmp.set("v.selectedValu" ,cmp.find('select').get('v.value') ); 
    },
})