MaterialMenuComponent class
The Material Menu renders a menu based on a MenuModel object. This menu
comprises a material-list
in a material-popup
and a
material-button
whose text or icon can be specified by the caller.
The menu expands when the button is clicked and closes when either an item is selected or a region outside the dropdown is clicked.
- Implemented types
- Mixed-in types
- Annotations
-
- @Component(selector: 'material-menu', directives: [MaterialButtonComponent, MaterialIconComponent, MaterialTooltipDirective, MenuPopupComponent, NgIf, PopupSourceDirective], providers: [ExistingProvider(HasDisabled, MaterialMenuComponent)], templateUrl: 'material_menu.html', changeDetection: ChangeDetectionStrategy.onPush)
Constructors
- MaterialMenuComponent(HtmlElement _root)
Properties
- activateFirstItemOnExpand → bool
-
True if the menu item group should select the first item when the popup
is opened.
no setterinherited
- activateLastItemOnExpand → bool
-
True if the menu item group should select the first item when the popup
is opened.
no setterinherited
- ariaLabel ↔ String
-
Aria label for button trigger.
getter/setter pair
-
no getter
-
Trigger button text. Ignored if the MenuModel has an icon.
getter/setter pair
- closeMenuOnClick ↔ bool
-
If true, the menu popup will be closed if the trigger button is clicked
while the menu is open.
getter/setter pairinherited
- disabled ↔ bool
-
Whether the menu is disabled or not.
getter/setter pairoverride
- expandAction ↔ ExpandAction?
-
Expansion state of the menu popup.
getter/setter pairinherited
-
expandActionChange
→ Stream<
ExpandAction?> -
Outputs an event when the menu expansion state is changed.
no setterinherited
- focusable ← Focusable?
-
no getterinherited
- hashCode → int
-
The hash code for this object.
no setterinherited
- hasIcon → bool
-
no setter
-
no setter
- hasTooltip → bool
-
no setter
- isExpanded ↔ bool
-
True if the menu popup is expanded/open.
getter/setter pairinherited
-
isExpandedChange
→ Stream<
bool> -
Outputs an event when the menu is expanded.
no setterinherited
- isRtl ↔ bool?
-
Whether the direction of the component is RTL.
getter/setter pairinherited
-
The displayed menu.
getter/setter pairinherited
-
no getter
-
onFocus
→ Stream<
FocusEvent> -
Event when the element is focused.
no setterinherited
-
onTrigger
→ Stream<
void> -
Outputs an event when the menu button is triggered.
no setterinherited
- popupClass ↔ String?
-
CSS classes to append onto the menu popup.
getter/setter pair
-
preferredPositions
↔ Iterable<
RelativePosition> -
Preferred positions to pass to the material popup component.
getter/setter pairinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- tabbable ↔ bool
-
Whether the menu is tabbable or not.
getter/setter pair
- tooltipText → String
-
no setter
- width ↔ int
-
Selects 1 of 5 predefined width values for the menu.
getter/setter pairinherited
Methods
-
focus(
) → void -
Item/component focuses itself
inherited
-
handleBackspaceKey(
KeyboardEvent event) → void -
inherited
-
handleCharCodeKey(
KeyboardEvent event) → void -
inherited
-
handleDeleteKey(
KeyboardEvent event) → void -
inherited
-
handleDownKey(
KeyboardEvent event) → void -
Provides the default implementation if parent class mixes
in KeyboardHandlerMixin.
inherited
-
handleEndKey(
KeyboardEvent event) → void -
inherited
-
handleEnterKey(
KeyboardEvent event) → void -
inherited
-
handleEscapeKey(
KeyboardEvent event) → void -
inherited
-
handleFocus(
FocusEvent event) → void -
inherited
-
handleHomeKey(
KeyboardEvent event) → void -
inherited
-
handleLeftKey(
KeyboardEvent event) → void -
inherited
-
handlePageDown(
KeyboardEvent event) → void -
inherited
-
handlePageUp(
KeyboardEvent event) → void -
inherited
-
handlePopupTriggerAction(
UIEvent event) → void -
inherited
-
handleRightKey(
KeyboardEvent event) → void -
inherited
-
handleSpaceKey(
KeyboardEvent event) → void -
inherited
-
handleUpKey(
KeyboardEvent event) → void -
Provides the default implementation if parent class mixes
in KeyboardHandlerMixin.
inherited
-
ngAfterViewInit(
) → void -
ngOnDestroy(
) → void - Executed before the directive is removed from the DOM and destroyed.
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
onKeyDown(
KeyboardEvent event) → void -
Keydown callback used to handle arrow keys.
inherited
-
onKeyPress(
KeyboardEvent event) → void -
Keypress callback used to handle enter and space keys.
inherited
-
onKeyUp(
KeyboardEvent event) → void -
Keyup callback used to handle escape keys.
inherited
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited