Component code:
<lightning:select name="wallheight" label="Wall Height : " onchange="{!c.doSomething}">
<aura:iteration items="{!v.wallheight}" var="wallheight">
<option text="{!wallheight.Name}" value="{!wallheight.value}" selected="{!wallheight.selected}"/>
</aura:iteration>
</lightning:select>
Controller code:
doSomething : function(component,event,helper){
console.log(component.find("wallheight").get("v.value"));
//alert(x);
}
I am getting below error
This page has an error. You might just need to refresh it. Action failed: c:form$controller$doSomething [Cannot read property 'get' of undefined] Failing descriptor: {c:form$controller$doSomething}