Skip to main content
cngx-src documentation

CngxDataGridAccordionContext

Interface

projects/ui/data-grid-accordion/data-grid-accordion.token.ts

Referenced by#

Import#

import { CngxDataGridAccordionContext } from '@cngx/ui/data-grid-accordion'

Description#

UI-local context a CngxDataGridAccordion exposes so each CngxDataGridRow reads the shared heading level without injecting the concrete group class (cyclic type, blocks Atomic Decompose). Kept separate from the headless CNGX_ACCORDION brain contract, which stays skin-agnostic - heading semantics are a grid concern. The shared column template reaches rows through the inherited --cngx-dga-columns custom property (CSS cascade), so it needs no signal here.

The group also hosts the orthogonal CngxSort and CngxFilter atoms and exposes them here as sort and filter, so cngxDgaSortHeader cells drive the sort with no [cngxSortRef] and the cngxDgaFilter slot writes filterTerm. The context still carries state only - the consumer's computed() derives the visible + ordered rows.

Index#

Instance Properties#

Readonly

The group's hosted CngxFilter. [filterPredicate] feeds its controlled predicate; a consumer reads filter.predicate() (or drives addPredicate for facet filtering) and derives the visible rows via computed().

filterTerm#WritableSignal
Readonly

The simple text filter term, two-way bindable as [(filterTerm)]. The cngxDgaFilter input writes it (debounced); a consumer matches it against its own row fields in a computed(). Writable so the slot directive can set it.

headingLevel#Signal
Readonly

Heading level (2-6) every row's role="heading" wrapper reflects via aria-level.

Readonly

The group's hosted CngxSort. cngxDgaSortHeader cells read its sorts() and call setSort(...); a consumer derives the ordered rows from it via computed().