I am using lightningmenu item in an aura iteration
event.detail.menuItem.get("v.value");
Compoennt Code
<lightning:buttonMenu iconName="utility:down" onselect="{!c.onButtonMenuSelect}" alternativeText="Show menu" class="{!financialAccountRecord.Id}">
<lightning:menuItem value="edit" label="Edit"/>
Controller Code:
onButtonMenuSelect: function(component, event, helper) {
var idx = event.detail.menuItem("value"));
switch (event.getParam("value")){
case "edit": helper.doEdit(); break;
case "delete": helper.doDelete(); break;
}
}
Howvere the value of idx is coming as undefined. I also tried the following variations:
({
handleSelect: function(component, event, helper) {
switch event.get("value") {
case "edit": helper.doEdit(); break;
case "edit": helper.doDelete(); break;
}
}
})