interface MenuContainerProps {
    focusTimeoutDelay?: number;
    isOpen: boolean;
    menu: ReactElement<any, string | JSXElementConstructor<any>>;
    menuRef: RefObject<any>;
    onOpenChange?: ((isOpen: boolean) => void);
    onOpenChangeKeys?: string[];
    popperProps?: MenuPopperProps;
    shouldPreventScrollOnItemFocus?: boolean;
    toggle: ReactNode;
    toggleRef: RefObject<any>;
    zIndex?: number;
}

Properties

focusTimeoutDelay?: number

Time in ms to wait before firing the toggles' focus event. Defaults to 0

isOpen: boolean

Flag to indicate if menu is opened.

menu: ReactElement<any, string | JSXElementConstructor<any>>

Menu to be rendered

menuRef: RefObject<any>

Reference to the menu

onOpenChange?: ((isOpen: boolean) => void)

Callback to change the open state of the menu. Triggered by clicking outside of the menu, or by pressing any keys specificed in onOpenChangeKeys.

onOpenChangeKeys?: string[]

Keys that trigger onOpenChange, defaults to tab and escape. It is highly recommended to include Escape in the array, while Tab may be omitted if the menu contains non-menu items that are focusable.

popperProps?: MenuPopperProps

Additional properties to pass to the Popper

shouldPreventScrollOnItemFocus?: boolean

Flag indicating if scroll on focus of the first menu item should occur.

toggle: ReactNode

Toggle to be rendered

toggleRef: RefObject<any>

Reference to the toggle

zIndex?: number

z-index of the dropdown menu