Interface IOpenOptions

An options object for the open method on a menu.

interface IOpenOptions {
    forceX?: boolean;
    forceY?: boolean;
    host?: HTMLElement;
    ref?: HTMLElement;
}

Properties

forceX?: boolean

Whether to force the X position of the menu.

Setting to true will disable the logic which repositions the X coordinate of the menu if it will not fit entirely on screen.

The default is false.

forceY?: boolean

Whether to force the Y position of the menu.

Setting to true will disable the logic which repositions the Y coordinate of the menu if it will not fit entirely on screen.

The default is false.

The DOM node to use as the menu's host.

If not specified then uses document.body.

The child of host to use as the reference element. If this is provided, the menu will be inserted before this node in the host. The default is null, which will cause the menu to be added as the last child of the host.