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
Component
<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">
<option>{!mapValue}</option>
</aura:iteration>
</aura:iteration>
</lightning:select>
</aura:component>
Controller
handleChange: function (cmp, event, helper) {
alert(event.getParam('mapValue'));
}