Options
All
  • Public
  • Public/Protected
  • All
Menu

Interface ContextMenuHookReturnValue

remarks

@since 5.0.0

Hierarchy

Index

Properties

menuNodeRef: RefObject<HTMLDivElement>

A ref containing the menu DivHTMLElement if you need access to it for your use case.

An object of props that should be provided to the Menu component.

menuRef: Ref<HTMLDivElement>

Maybe don't need to provide.

setCoords: Dispatch<SetStateAction<InitialCoords>>

This function can be used to manually move the context menu to new coordinates if the default behavior did not work. You probably won't ever need to use this.

setVisible: Dispatch<SetStateAction<boolean>>

A function that can be used to manually set the visibility of the context menu when the default behavior does not match your use case.

visible: boolean

Boolean if the context menu is currently visible,

Methods

  • onContextMenu<E>(event: MouseEvent<E, MouseEvent>): void
  • An event handler that should passed to an element that causes a Menu to appear instead of the default browser context menu.

    Type parameters

    • E: HTMLElement

    Parameters

    • event: MouseEvent<E, MouseEvent>

    Returns void

Generated using TypeDoc