projects/common/interactive/menu/dismiss-handler.ts
import { CngxMenuTriggerDismissBinding } from '@cngx/common/interactive'
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.
lastSource
isOpen
CngxMenuTrigger
CngxContextMenuTrigger
Signal
The dismissal source that closed the menu most recently. null before the first close. Read by templates / telemetry sinks.
null
void
Resolve the popover thunk, instantiate the handler on first call, and install its listeners. Idempotent within a single open cycle.
Remove the listeners installed by the last attach(). Idempotent.
attach()