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
Team SaadhviTeam Saadhvi 

Picklist values are not being displayed in the lightning component

Hi, 

When I reload the custom lightning component page in community pick-list values are not showing drop-down values. It is showing the pick-list values for the first time when page load without any issue. But Problem is when I do manual reload of the page i missing the picklist dropdown values .And It is working fine with Internet Explorer.

Not working in crome and firefox
User-added image
Khan AnasKhan Anas (Salesforce Developers) 
Hi Saadhvi,

Greetings to you!

It looks like you are using force:inputField in lightning component. This is a known issue: force:inputField Lightning Component input box disappears after refreshing page in Lightning Experience or Salesforce1. Keep watching this issue until get fixed.

https://success.salesforce.com/issues_view?id=a1p3A0000008gLZQAY

Workaround provided by Salesforce:

Place force:inputFields as the top-level elements within a Lightning Component (not wrapped by an outer div). 

You can also place only one force:inputField element outside of the div to resolve this issue. In that case you can hide the force:inputField component that is outside of the div from view of users (class with "display: none;"), and then the other force:inputFields within the div will stay visible after refreshing the page.

If you are not using force:inputField then I request you please post the complete code snippet of what you have tried so that we can look into it and can help you accordingly.

I hope it helps you.

Kindly let me know if it helps you and close your query by marking it as solved so that it can help others in the future. It will help to keep this community clean.

Thanks and Regards,
Khan Anas
Team SaadhviTeam Saadhvi
Hi Khan Anas, I tried to out side of the dev also not working, 

Adding the Component code :
 
<aura:component controller="CreateCaseRecord" 
                implements="force:appHostable,flexipage:availableForAllPageTypes,flexipage:availableForRecordHome,force:hasRecordId,forceCommunity:availableForAllPageTypes,force:lightningQuickAction" 
                access="global" >
    <aura:attribute name="selectedLookUpRecord" type="sObject" default="{}"/>
    <aura:attribute name="selectedContactLookUpRecord" type="sObject" default="{}"/>    
    
    <!-- Include Static Resource-->
    <ltng:require styles="/resource/bootstrap/css/bootstrap.min.css" 
                  scripts="/resource/bootstrap/js/jquery.js,/resource/bootstrap/js/bootstrap.min.js"/>
    
    <!-- Define Attribute-->
    <aura:attribute name="ca" type="Case" default="{'sobjectType': 'Case',
                                                   'Reason': '',
                                                   'Subject': '',
                                                   'Description': '',
                                                   'Contact': ''                                                   
                                                   }"/>
    
    
    <div class="container-fluid">
        <div style="height:40px; width:40px;" align = "right">
            <img src="{!$Resource.RA}"/>            
        </div>
        <div>
            <h1 align = "center"><b>Salesforce Web To Case</b></h1>
        </div>
        <br></br>
        <div class="form-group">
            <label>Case Reason</label>
            <force:inputField class="form-control" value="{!v.ca.Reason}"/>
        </div>              
        
        <div class="form-group">
            <label>Subject</label>
            <ui:inputText class="form-control" value="{!v.ca.Subject}"/>
        </div>
        <div class="form-group">
            <label>Description</label>
            <ui:inputText class="form-control" value="{!v.ca.Description}"/>
        </div>     
        <div class="form-group">
            <label>County</label>
            <force:inputField class="form-control" value="{!v.ca.County__c}"/>
        </div>
        
        <b><c:customLookup objectAPIName="account" IconName="standard:account" selectedRecord="{!v.selectedLookUpRecord}" label="Account Name" SelectedCounty ="{!v.ca.County__c}"/></b>
        <b><c:customLookup objectAPIName="contact" IconName="standard:contact" selectedContactRecord="{!v.selectedContactLookUpRecord}" selectedAccount="{!v.selectedLookUpRecord}" label="Contact Name"/></b>
        
        <div class="form-group" >
            <label>Name of the submitter</label>
            <force:inputField class="form-control" value="{!v.ca.Name_of_the_submitter__c}"/>
        </div>  
        <br></br>
        
    </div>
    <br></br>
    <!--<div class="col-md-4 text-center" align = "center" >
        <ui:button class="btn btn-default" press="{!c.create}">Submit</ui:button>
    </div>-->
    <div class="col-md-4 text-center" align = "center" >
        <ui:button class="slds-button_success" label="SUBMIT" aura:id="btnSuccess" press="{!c.create}"></ui:button>
    </div>
    
    
</aura:component>