Options
All
  • Public
  • Public/Protected
  • All
Menu

Context Menu options for ContextMenu plugin

Type parameters

  • T

Hierarchy

  • ContextMenuOptions

Index

Properties

Optional allowDefaultMenu

allowDefaultMenu: boolean

Whether the default context menu is allowed. @default false

Optional dismiss

dismiss: (container: HTMLElement) => void

Type declaration

    • (container: HTMLElement): void
    • Dismiss function for the context menu, it will be called when user wants to dismiss this context menu e.g. user click away so the menu should be dismissed

      Parameters

      • container: HTMLElement

        The container HTML element

      Returns void

render

render: (container: HTMLElement, items: T[], onDismiss: () => void) => void

Type declaration

    • (container: HTMLElement, items: T[], onDismiss: () => void): void
    • Render function for the context menu

      Parameters

      • container: HTMLElement

        The container HTML element, it will be located at the mouse click position, so the callback just need to render menu content into this container

      • items: T[]
      • onDismiss: () => void

        The onDismiss callback, some menu render need to know this callback so that it can handle the dismiss event

          • (): void
          • Returns void

      Returns void

Generated using TypeDoc