Skip to main content
cngx-src documentation

CngxMenuConfig

Interface

projects/common/interactive/menu/menu-config.ts

Import#

import { CngxMenuConfig } from '@cngx/common/interactive'

Description#

Resolved configuration consumed by every menu directive in the family. Default values live in DEFAULT_MENU_CONFIG; override at app scope via provideMenuConfig or per-component via provideMenuConfigAt.

Index#

Instance Properties#

Readonly
closeOnSelect#boolean
Readonly
dismissOnBlur#boolean
Readonly

Whether the "context lost" bundle dismisses the menu. The bundle covers BOTH window blur (system notification, OS-native menu overlaying, tab switch) AND document pointercancel outside the popover and trigger host (palm rejection on touch devices, gesture cancelled by the browser). The two sources share one toggle by design; consumers needing one without the other replace the entire handler via CNGX_MENU_DISMISS_HANDLER_FACTORY. Default true.

dismissOnOutsideClick#boolean
Readonly

Whether pointerdown outside both the menu's popover and the trigger host dismisses the menu. Native context menus, browser right-click menus, and major web apps all close on outside click. Default true.

dismissOnScroll#boolean
Readonly

Whether window scroll while the menu is open dismisses it. Default false - consumers with scrollable menu panels (long lists, treeselect-style) often want the menu to remain anchored during scroll. Opt in via withDismissOnScroll.

typeaheadDebounce#number
Readonly