Skip to main content

MenuSubmenu class

📖 Description​

The MenuSubmenu class defines a menu item for the Menu class that can hold another menu (sub-menu). It is derived from the MenuItem class.


🆕 constructor​

Creates a new MenuSubmenu instance.

Signature​

constructor(label: string, options: MenuOption[], disabled?: boolean): MenuSubmenu

Parameters​

NameTypeOptionalDescription
labelstringNoSpecifies the item label.
optionsMenuOption[]NoSpecifies the submenu options.
disabledbooleanYesSpecifies if the item is disabled (default is false).

Return value​

Returns a reference to the new MenuSubmenu instance.