ContextMenuPanelRef

Defines the reference interface for controlling the context menu panel component. Provides methods to programmatically show and hide the context menu in response to user actions or application logic. Used with useRef to obtain direct control over context menu visibility and positioning.

Methods

The following table outlines the methods for the ContextMenuPanelRef:

NameParametersReturnsDescription
hideContextMenu
-
void

Hides the currently displayed context menu. Closes the context menu and removes it from the viewport without requiring additional parameters.

showContextMenu
  • args

    : ContextMenuArgs
  • void

    Displays the context menu at the specified position or target element. Accepts positioning arguments to control menu placement on the screen.


    Params:
  • args: Arguments containing target element and optional position offsets