A class responsible for rendering a menu drop-down.
The default title.
The configured menu items.
Optional
options: { cssClass?: string; icon?: string; onAction?: (arg0: MouseEvent) => any } = {}Optional
cssClass?: stringThe menu CSS class name. Required if providing an action.
Optional
icon?: stringUse an icon for the dropdown rather than a text label.
Optional
onAction?: (arg0: MouseEvent) => anyA callback to fire when a menu item is clicked.
Attach event listeners.
The root menu element.
Recurse through the menu structure and apply a function to each item in it.
The function to call on each item. Return false to prevent iterating over any further items.
Construct the drop-down menu's HTML.
HTML contents as a string.
Protected
#onProtected
Handle spawning a drop-down menu.
The triggering event.
Protected
Static
_renderProtected
Render a list of drop-down menu items.
The menu items.
HTML contents as a string.
Protected
Static
_renderProtected
Render an individual drop-down menu item.
The menu item.
HTML contents as a string.
A class responsible for creating a drop-down.