+ Start a Discussion
azhar khasimazhar khasim 

passing list of users into a picklist and display in Lightning Component

The Picklist field is visible but users are not visible and I am not able to select the users.

Apex Class: 
public static List<String> getPickListValuesIntoList(){
        List<String> pickListValuesList = new List<String>();
        List<User> us = [Select id, name, MobilePhone, Email, IsActive from User Where IsActive = true];
        for( User usr : us){
        return pickListValuesList;  

<aura:attribute name="picklistValues" type="String[]" />
	<aura:handler name="init" value="{!this}" action="{!c.doInit}" />

<lightning:combobox name="general" label="Select User" 
               placeholder="Choose User…" value="{!v.User.Name}" options="{!v.picklistValues}" onchange="{!c.doInit}"/>

doInit: function (component, event, helper) {
        var action = component.get("c.getPickListValuesIntoList");
        action.setCallback(this, function(response){
                var state = response.getState();
                if (state === "SUCCESS") {
                    var listItems = response.getReturnValue();
                    component.set("v.picklistValues", listItems);

Please help me from this issue.

Thanks and Regards,
AnudeepAnudeep (Salesforce Developers) 
Hi Azar - Can you try with lightning:select and see if the you are able to select the values?

See this post for sample code