You need to sign in to do that
Don't have an account?

Displaying a picklist field in lightning component ?
hey everyone,
I m strating with Lightning components and I need to do something like this : (in Visualforce page)
<apex:inputField label="Client" value="{!Opportunity.client__c}" style="width:70%;"/> <br/>
With lightning i tried this :
<ui:inputSelect aura:id="client" label="client"
class="slds-input"
labelClass="slds-form-element__label"
value="{!v.opportunity.client__c}"/>
But the list doesn't display the picklist values when its with lightning components !
Anyone can help please ?
Thanks !
I m strating with Lightning components and I need to do something like this : (in Visualforce page)
<apex:inputField label="Client" value="{!Opportunity.client__c}" style="width:70%;"/> <br/>
With lightning i tried this :
<ui:inputSelect aura:id="client" label="client"
class="slds-input"
labelClass="slds-form-element__label"
value="{!v.opportunity.client__c}"/>
But the list doesn't display the picklist values when its with lightning components !
Anyone can help please ?
Thanks !
The simplest solution is to just hardcode your own <ui:inputSelectOption> values. If you want a more robust solution, you'll have to leverage an Apex Controller to do a describe and then iterate through the Picklist values in your component.