Skip to main content

MenuSubmenuWithIcon class

📖 Description​

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


🆕 constructor​

Creates a new MenuSubmenuWithIcon instance.

Signature​

constructor(
icon: number,
label: string,
options: MenuOption[],
disabled?: boolean
): MenuSubmenuWithIcon

Parameters​

NameTypeOptionalDescription
iconnumberNoSpecifies the icon.
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 MenuSubmenuWithIcon instance.