I have the following component:
<lightning:buttonMenu iconName="utility:thunder" alternativeText="Settings" onselect="{!c.handleselect}">
<lightning:menuItem label="Edit" value="{!cc.Id}"/>
<lightning:menuItem label="Delete" value="{!cc.Id}"/>
</lightning:buttonMenu>
JS controller
handleselect: function(component, event, helper){
let bhold = event.getParam("label");
let idhold = event.getParam("value");
console.log("test 1 : " + event.getSource());
console.log("test : " + bhold + " : " + idhold);
if(bhold === "Delete"){
component.set("v.showdeleteModal", true);
}
}
the lightning button menu is within an aura interation over a series of records.
my question is, how can i pass back both the id and the label, Basically, I would like to pass both "Edit" or "Delete" AND the id regardless of what is chosen
output is bhold is undefined while idhold holds the correct value