Skip to main content
cngx-src documentation

CngxMatTabsConfig

Interface

projects/ui/mat-tabs/mat-tabs-config.ts

Import#

import { CngxMatTabsConfig } from '@cngx/ui/mat-tabs'

Description#

Behaviour knobs for [cngxMatTabs]. Single canonical surface symmetric to provideSelectConfig in the select family - every tunable is a with* feature on the same aggregator instead of a standalone DI token, so consumers configure the directive through one entry point and the API surface stays small.

Per-instance Inputs win over provideMatTabsConfigAt(...) (component scope), which wins over provideMatTabsConfig(...) (root), which wins over the library defaults captured by CNGX_MAT_TABS_CONFIG_DEFAULTS.

Index#

Instance Properties#

anchorMaxAttempts#number
ReadonlyOptional

Cap on the [cngxMatTabs] overflow-anchor retry loop. The directive runs createDomAnchorRetry on every afterNextRender until .mat-mdc-tab-header materialises in the host subtree; the cap exists so a never-rendered host (e.g. <mat-tab-group> gated behind a never-true *ngIf / @defer) does not re-arm forever.

Default: 5 - well above normal Material render lag (a single afterNextRender is enough on every supported version), low enough to surface a dev-mode console.warn promptly when the consumer DOM never appears.

Note: <cngx-tab-overflow>'s own attach loop uses 60 rAF frames, not 5 - different scheduler, different budget. The two caps are intentionally independent because the underlying timing primitives differ; a shared "anchor max attempts" knob would conflate one frame of afterNextRender with one rAF frame, which they are not.

ReadonlyOptional

Diagnostic sink invoked when a consumer wires exactly one of *cngxMatTabAggregatorContent or its ViewContainerRef. Default is a dev-mode console.warn; override via withHalfWiredSlotSink to wire production telemetry (Sentry breadcrumbs, custom logger, CI fail-fast).