Skip to main content
cngx-src documentation

withDismissOnScroll

Functioncommon/interactive/menu

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

Description#

Whether window scroll while the menu is open dismisses it. Default: false. Opt in when the menu should follow native context-menu behaviour and close as soon as the page scrolls. Scroll-dismiss listens to window only - the nearest scrollable ancestor is not traversed.

Signature#

withDismissOnScroll(dismiss: boolean)

Parameters#

@paramdismissboolean

Returns#

CngxMenuConfigFeature