Represents a utility for displaying a context menu.

  • Type Parameters

    • T extends unknown = object

      The type of the payload object.

    Parameters

    • params: IParams<T>

      The parameters for configuring the context menu.

      • keepMounted

        Flag indicating if the menu should remain mounted when closed.

      • AfterContent

        The component to render after the menu items.

      • BeforeContent

        The component to render before the menu items.

      • deps

        Dependencies to trigger reload of menu items.

      • payload

        The payload object to pass to menu item handlers.

      • onLoadStart

        The callback to invoke when the menu items start loading.

      • onLoadEnd

        The callback to invoke when the menu items finish loading.

      • onAction

        The callback to invoke when a menu item is clicked.

      • options

        The array of options to render as menu items.

      • fallback

        The component to render as a fallback during loading.

      • reloadSubject

        The subject to trigger a reload of menu items.

      • throwError

        Flag indicating if an error should be thrown on loading failures.

    Returns IResult

    • The object containing the properties and methods for rendering the context menu.