Skip to main content
cngx-src documentation

CngxTabOverflowDomAdapter

Interface

projects/common/tabs/overflow/dom-adapter.ts

Import#

import { CngxTabOverflowDomAdapter } from '@cngx/common/tabs'

Description#

Resolves the DOM elements <cngx-tab-overflow> observes.
cngx-native keys by [id="${handle.id}-header"]; the Material twin keys by positional index into .mat-mdc-tab (handle ids never appear on Material's rendered DOM). \

The molecule is variant-agnostic and consumes whichever adapter CNGX_TAB_OVERFLOW_DOM_ADAPTER_FACTORY provides.

Index#

Methods#

resolveStripRoot#HTMLElement | null
resolveStripRoot(panelHost: CngxTabPanelHost, host: HTMLElement)

Resolve the IntersectionObserver root - the scroll viewport the molecule observes.
Returning null short-circuits the attach; the molecule's rAF retry loop polls again next frame.

@parampanelHostCngxTabPanelHost
@paramhostHTMLElement
resolveTabButton#HTMLElement | null
resolveTabButton(handle: CngxTabHandle, root: HTMLElement, idx: number)

Resolve the rendered button for handle inside root. cngx-native keys by handle.id; Material adapters key by idx.

@paramhandleCngxTabHandle
@paramrootHTMLElement
@paramidxnumber