I have a lightning component which generates picklist values from a map. How do I pass the selected value from the lightning select to the controller.

I have the following but get: undefined on selection


<aura:component controller="SampleAuraController">
    <aura:attribute name="mapValues" type="object" /> 
  <aura:handler name="init" value="{!this}" action="{!c.getMapValues}"/>
            <lightning:select aura:id="select"  name="selectItem" label="Select an item" variant="label-hidden" onchange="{!c.handleChange}" value="{!v.mapValue}" >
                <option value="">choose one...</option>
                <aura:iteration items="{!v.mapValues}"  var="mapKey" indexVar="key">  
                    <!--  <strong><p>{!mapKey.key}</p></strong>-->
                    <aura:iteration items="{!mapKey.value}" var="mapValue">


 handleChange: function (cmp, event, helper) {

1 Answer 1


You can define a client-side controller action to handle various input events on the dropdown list. For example, to handle a change event on the component, use the onchange attribute. Retrieve the selected value using cmp.find("select").get("v.value").

See the below code, where select is the aura:id of the lightning:select.

handleChange: function (cmp, event, helper) {


You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .