ComPDFKit Web SDK
    Preparing search index...

    Class MainMenu

    The main ("more") menu: a Flyout whose dataElement defaults to 'MainMenuFlyout', so adding it with UI.Flyouts.addFlyouts replaces the default menu. Its items are the default menu items followed by additionalItems.

    const mainMenu = new instance.UI.Components.MainMenu({
    additionalItems: [
    { label: 'About', onClick: () => instance.UI.openElements(['aboutModal']) },
    ],
    });
    instance.UI.Flyouts.addFlyouts([mainMenu]);

    Hierarchy (View Summary)

    Index
    • Replaces the items of the flyout and updates it on screen.

      Parameters

      • items: unknown[]

        Flyout items: objects with label, onClick, icon or children, component instances, 'divider', or dataElements of existing items.

      Returns void

    dataElement: string

    Unique name of the flyout.

    items: FlyoutItem[]

    Items of the flyout; assigning a new array is the same as calling setItems.

    properties: FlyoutData

    The flyout's data as added to the viewer by UI.Flyouts.addFlyouts.

    toggleElement?: string

    dataElement of the element that opens the flyout.

    type: string

    Item type: 'flyout'.