Newer Version Available

This content describes an older version of this product. View Latest

ui:radioMenuItem

​A menu item with a radio button that indicates a mutually exclusive selection and can be used to invoke an action. This component is nested in a ui:menu component.

A ui:radioMenuItem component represents a menu list item for single selection. Use aura:iteration to iterate over a list of values and display the menu items. A ui:menuTriggerLink component displays and hides your menu items.

1<aura:attribute name="status" type="String[]" default="Open, Closed, Closed Won, Any"/>
2    <ui:menu>
3        <ui:menuTriggerLink class="radioMenuLabel" aura:id="radioMenuLabel" label="Select a status"/>
4        <ui:menuList class="radioMenu" aura:id="radioMenu">
5            <aura:iteration items="{!v.status}" var="s">
6                <ui:radioMenuItem label="{!s}" value="{!s}"/>
7            </aura:iteration>
8        </ui:menuList>
9    </ui:menu>

Attributes

Attribute Name Attribute Type Description Required?
body Component[] The body of the component. In markup, this is everything in the body of the tag.
class String A CSS style to be attached to the component. This style is added in addition to base styles output by the component.
disabled Boolean Specifies whether the component should be displayed in a disabled state. Default value is "false".
hideMenuAfterSelected Boolean Set to true to hide menu after the menu item is selected.
label String The text displayed on the component.
selected Boolean The status of the menu item. True means this menu item is selected; False is not selected.
type String The concrete type of the menu item. Accepted values are 'action', 'checkbox', 'radio', 'separator' or any namespaced component descriptor, e.g. ns:xxxxmenuItem.

Events

Event Name Event Type Description
dblclick COMPONENT Indicates that a component has been double-clicked.
mouseover COMPONENT Indicates that the user has moved the mouse pointer over the component.
mouseout COMPONENT Indicates that the user has moved the mouse pointer away from the component.
mouseup COMPONENT Indicates that the user has released the mouse button.
mousemove COMPONENT Indicates that the user has moved the mouse pointer.
click COMPONENT Indicates that a component has been clicked.
mousedown COMPONENT Indicates that the user has pressed a mouse key.
select COMPONENT Indicates that the user has made a selection.
blur COMPONENT Indicates that a component has been put out of focus.
focus COMPONENT Indicates that a component has been put on focus.
keypress COMPONENT Indicates that the user has pressed and held down a keyboard key.
keyup COMPONENT Indicates that the user has released a keyboard key.
keydown COMPONENT Indicates that the user has pressed and released a keyboard key.