---
schema_version: "1"
id: 662786a90630472cb1aa0c228a0b2858b87dd0921f83476bf2e2251512b22b60
title: Menu Select (Deprecated)
collection: developer
version: current
locale: en-us
portal_url: https://docs.salesforce.com/developer/current/en-us/lightning-base-components/lightning-design-system/guides/aura/components/ui/menuSelect/ui-menu-select.md
canonical_url: https://developer.salesforce.com/docs/platform/lightning-component-reference/guide/ui-menu-select.html
source_site: developer.salesforce.com
content_type: documentation
content_hash: fc5a813abcefcfbc20fe9cb3213073842aec859b15144d2228ed8e2481a98c8a
products:
  - Lightning Component Reference
---
# Menu Select (Deprecated)

**`ui:menuSelect`**

Deprecated as of API version 47.0. Use [`lightning:select`](/docs/platform/lightning-component-reference/guide/aura-select.html) or [`lightning:combobox`](/docs/platform/lightning-component-reference/guide/aura-combobox.html) instead.

::::::tabset{tabs='[ "Develop", "Specifications"]'}

:::::tab

This event is fired when you select a menu item on the `ui:menuList` component. To set a handler for the `ui:menuSelect` event, use the `menuSelect` attribute on `ui:menuList`.

The following example shows a menu with two list items. The `handleSelect` client-side controller action handles the `ui:menuSelect` event.

```xml
<aura:component>
  <ui:menu>
    <ui:menuTriggerLink aura:id="trigger" label="Contacts" />
    <ui:menuList class="actionMenu" aura:id="actionMenu" menuSelect="{!c.handleSelect}">
      <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>
</aura:component>
```

When a menu item is clicked, the click event is handled before the `ui:menuSelect` event.

```javascript
({
  handleSelect: 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");
  },
});
```

If you're using this event with a component other than `ui:menuList`, register the event first.

```xml
<aura:registerEvent
  name="menuSelect"
  type="ui:menuSelect"
  description="The event fired when a menu item is selected."
/>
```


:::::

:::::tab
## Attributes

| Name               | Description                                                 | Type        | Default | Required |
| ------------------ | ----------------------------------------------------------- | ----------- | ------- | -------- |
| `deselectSiblings` | Deselects the siblings of the currently selected menu item. | boolean     |         |          |
| `focusTrigger`     | Sets focus to menuTrigger.                                  | boolean     |         |          |
| `hideMenu`         | Hides menu if set to true.                                  | boolean     |         |          |
| `selectedItem`     | The menu item that's selected.                              | component[] |         |          |

:::::

::::::
