Menu.Item

A menu item component which menu is consisted of. xclass: 'menuitem'.

parents: Component.Controller

defined in: menuitem.js

Class

Attributes

  • checkable {Boolean} Whether the menu item is checkable or not.
  • checked {Boolean} Whether the menu item is checked.
  • selectable {Boolean} Whether the menu item is selectable or not.
  • selected {Boolean} Whether the menu item is selected.
  • value {} The value associated with the menu item.

Methods


Class Detail

  • Menu.Item ()
    A menu item component which menu is consisted of. xclass: 'menuitem'.

Attributes Detail

  • checkable {Boolean} Whether the menu item is checkable or not. Set to true for checkbox option.
  • checked {Boolean} Whether the menu item is checked.
  • selectable {Boolean} Whether the menu item is selectable or not. Set to true for option.
  • selected {Boolean} Whether the menu item is selected.
  • value The value associated with the menu item.

Methods Detail

  • containsElement (element) view source
    Check whether this menu item contains specified element.
    Parameters
    •   element {NodeList} Element to be tested.
  • handleMouseEnter (e) view source
    Handle mouseenter event. Make parent menu to highlight itself. Protected, should only be overridden by subclasses.
    Parameters
  • handleMouseLeave (e) view source
    Handle mouseleave event. Make parent menu to unhighlight itself. Protected, should only be overridden by subclasses.
    Parameters
  • performActionInternal () view source
    Perform default action when click on enter on this menuitem. If selectable, then make it selected. If checkable, then toggle it. Finally fire click on its parent menu.
blog comments powered by Disqus
Top