new MainMenu( [options])
Parameters:
Name | Type | Argument | Description | ||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
options |
Object |
<optional> |
An object that contains the properties of the main menu
Properties
|
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'); }, }, ]);