Skip to main content
cngx-src documentation

CngxMenuDismissHandler

Interface

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

Import#

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

Description#

Handler returned by createMenuDismissHandler. Call attach() once per menu open; invoke the returned teardown on close.

Source observation runs through CngxMenuDismissHandlerOptions.onDismiss; the handler exposes no reactive state of its own so the trigger directive can store it as a plain field rather than a signal (avoids a signal write inside the isOpen effect).

Index#

Methods

Methods#

attach#void

Install the listeners enabled by the options. Returns a teardown closure that removes every installed listener. Each attach() must be balanced by exactly one teardown call.