A ui:checkboxMenuItem component represents a menu list item that enables multiple 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.
<aura:attribute name="status" type="String[]" default="Open, Closed, Closed Won, Any"/> <ui:menu> <ui:menuTriggerLink aura:id="checkboxMenuLabel" label="Multiple selection"/> <ui:menuList aura:id="checkboxMenu"> <aura:iteration items="{!v.status}" var="s"> <ui:checkboxMenuItem label="{!s}"/> </aura:iteration> </ui:menuList> </ui:menu>
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. |
Event Name | Event Type | Description |
---|---|---|
dblclick | COMPONENT | The event fired when the user double-clicks the component. |
mouseover | COMPONENT | The event fired when the user moves the mouse pointer over the component. |
mouseout | COMPONENT | The event fired when the user moves the mouse pointer away from the component. |
mouseup | COMPONENT | The event fired when the user releases the mouse button over the component. |
mousemove | COMPONENT | The event fired when the user moves the mouse pointer over the component. |
click | COMPONENT | The event fired when the user clicks on the component. |
mousedown | COMPONENT | The event fired when the user clicks a mouse button over the component. |
select | COMPONENT | The event fired when the user selects some text. |
blur | COMPONENT | The event fired when the user moves off from the component. |
focus | COMPONENT | The event fired when the user focuses on the component. |
keypress | COMPONENT | The event fired when the user presses or holds down a keyboard key on the component. |
keyup | COMPONENT | The event fired when the user releases a keyboard key on the component. |
keydown | COMPONENT | The event fired when the user presses a keyboard key on the component. |