Class: MainMenu

UI.Components. MainMenu


Parameters:
Name Type Argument Description
options Object <optional>
An object that contains the properties of the main menu
Properties
Name Type Argument Description
additionalItems Array.<Object> <optional>
An array of extra items to add to the main menu
dataElement Object <optional>
The data element for the main menu flyout

Extends

Members


dataElement

A unique string that identifies the flyout. This property is ReadOnly.
Inherited From:

items

An array of objects that represent the items in the flyout. This property can be used both as a getter and setter.
Inherited From:

Methods


setItems(items)

Sets the items of the flyout.
Parameters:
Name Type Description
items Array.<FlyoutItem> An array of objects that represent the items to be added to the flyout.
Inherited From:
Example
const flyout = new UI.Components.Flyout({
   dataElement: 'exampleFlyout',
   label: 'Flyout',
 });
 flyout.setItems([
   {
     label: 'Item 1',
     onClick: () => {
       console.log('Item 1 clicked');
     },
   },
 ]);