Skip to main content
cngx-src documentation

createMenuTriggerDismissBinding

Functioncommon/interactive/menuv0.1.0

projects/common/interactive/menu/dismiss-handler.ts

Description#

Build the dismiss lifecycle for a menu-bearing trigger directive. Lazily instantiates the handler on first attach() so the trigger's popover input is bound before the factory reads it. The returned lastSource signal is owned by this binding - the factory writes it via its onDismiss callback, which runs from DOM event handlers (never inside an Angular effect()).

Signature#

createMenuTriggerDismissBinding(opts: CngxMenuTriggerDismissBindingOptions)

Parameters#

Returns#

CngxMenuTriggerDismissBinding