ui:menuSelect

Indicates that a menu item has been selected in the menu component.
For example, the ui:menuList component registers this event so it can be fired by the component.
<aura:registerEvent name="menuSelect"  type="ui:menuSelect"
                    description="The event fired when a menu item is selected." />
You can handle this event in a ui:menuList component instance. This example shows a menu component with two list items. It handles the ui:menuSelect event and click events.
<ui:menu>
    <ui:menuTriggerLink aura:id="trigger" label="Contacts"/>
        <ui:menuList class="actionMenu" aura:id="actionMenu" menuSelect="{!c.selected}">
            <ui:actionMenuItem aura:id="item1" label="All Contacts" 
                               click="{!c.doSomething}"/>
            <ui:actionMenuItem aura:id="item2" label="All Primary" 
                               click="{!c.doSomething}"/>
        </ui:menuList>
</ui:menu>

When a menu item is clicked, the click event is handled before the ui:menuSelect event, which corresponds to doSomething and selected client-side controllers in the following example.

({
    selected : function(component, event, helper) {
        var selected = event.getParam("selectedItem");
        
        // returns label of selected item
        var selectedLabel = selected.get("v.label"); 
    },
    
    doSomething : function(component, event, helper) {
        console.log("do something");
    }
})
Attribute Name Type Description
selectedItem Component[] The menu item which is selected
hideMenu Boolean Hides menu if set to true
deselectSiblings Boolean Deselects the siblings of the currently selected menu item
focusTrigger Boolean Sets focus to the ui:menuTrigger component