Skip to main content
cngx-src documentation

CngxMenuTriggerDismissBinding

Interface

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

Import#

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

Description#

Trigger-side dismiss lifecycle. Owns the reactive lastSource signal and the attach/detach pair both trigger directives invoke from their isOpen effect. Extracted so CngxMenuTrigger and CngxContextMenuTrigger share the same wiring without forking it.

Index#

Properties

Instance Properties#

lastSource#Signal
Readonly

The dismissal source that closed the menu most recently. null before the first close. Read by templates / telemetry sinks.

Methods#

attach#void

Resolve the popover thunk, instantiate the handler on first call, and install its listeners. Idempotent within a single open cycle.

detach#void

Remove the listeners installed by the last attach(). Idempotent.