Skip to main content

MenuSubmenuWithImage class

📖 Description​

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


🆕 constructor​

Creates a new MenuSubmenuWithImage instance.

Signature​

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

Parameters​

NameTypeOptionalDescription
imagestringNoSpecifies the image.
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 MenuSubmenuWithImage instance.