Shows the context menu with the given items at the given position.

Helper function to use the context menu singleton.

  • Parameters

    • params: {
          expand?: boolean;
          items: Partial<MenuItem>[];
          onHide?: (() => void);
          pos: Position;
          searchbar?: boolean;
          sort?: boolean;
          target?: HTMLElement;
      }
      • Optionalexpand?: boolean
      • items: Partial<MenuItem>[]
      • OptionalonHide?: (() => void)
          • (): void
          • Returns void

      • pos: Position
      • Optionalsearchbar?: boolean
      • Optionalsort?: boolean

        Whether to sort the items. Default to false.

      • Optionaltarget?: HTMLElement

    Returns void