Skip to main content
cngx-src documentation

createCngxMatTabOverflowDomAdapter

Functionui/mat-tabsv0.1.0

projects/ui/mat-tabs/overflow/mat-tab-overflow-dom-adapter.ts

Description#

Material variant of CngxTabOverflowDomAdapter.

resolveStripRoot walks from host up to <mat-tab-header> and locates .mat-mdc-tab-label-container via any rendered .mat-mdc-tab descendant — Material's IO-friendly scroll container.

resolveTabButton indexes positionally; Material owns the DOM and cngx handle ids never reach the button elements. Index correlates against presenter.tabs() registration order.

Wire it via the directive's CNGX_TAB_OVERFLOW_DOM_ADAPTER_FACTORY provider:

providers: [
  { provide: CNGX_TAB_OVERFLOW_DOM_ADAPTER_FACTORY,
    useValue: createCngxMatTabOverflowDomAdapter }
]

Signature#

createCngxMatTabOverflowDomAdapter()

Returns#

CngxTabOverflowDomAdapter