Skip to main content

Events

There are some events that get fired during use

onOpen?: () => void;
onAfterOpen?: () => void;
onClose?: () => void;
onItemHoverIn?: (item: ContextMenuItem) => void;
onItemHoverOut?: (item: ContextMenuItem) => void;
onInAnimationEnd?: () => void;
onOutAnimationEnd?: () => void;

onOpen

Returns: void

It fires before setting the state to open the context menu.

onAfterOpen

Returns: void

It fires after the context menu has been mounted.

onClose

Returns: void

It fires during unmount cleanup function

onItemHoverIn

Accepts: ContextMenuItem

Returns: void

It fires while hovering an item. Receives the hovered ContextMenuItem.

onItemHoverOut

Accepts: ContextMenuItem

Returns: void

It fires when the cursor stops hovering an item. Receives the hovered ContextMenuItem.

onInAnimationEnd

Returns: void

It fires when the opening animation ends.

onOutAnimationEnd

Returns: void

It fires when the closing animation ends.