Skip to main content
cngx-src documentation

CngxInteractiveGroupHost

Interface

projects/common/interactive/group-host/group-host.ts

Import#

import { CngxInteractiveGroupHost } from '@cngx/common/interactive'

Description#

The scaffolding bundle injectInteractiveGroupHost returns. Hosts re-export the fields they surface publicly (id, focused, errorState) and delegate their focusin/focusout host listeners to the handler pair.

Index#

Instance Properties#

ariaBusy#Signal
Readonly

true while the resolved state reports status() === 'loading'.

ariaInvalid#Signal
Readonly

invalid() || errorState() - the shared aria-invalid gate.

ariaLabelledBy#Signal
Readonly

Resolved aria-labelledby reference. An explicit labelledBy option always wins; otherwise the surrounding field's labelId applies - only inside a cngx-form-field whose host exposes it and while the explicit label option is empty. Group roles take no name from content - this channel names them inside a field.

errorState#Signal
Readonly

Field-host to aggregator cascade. Inside <cngx-form-field> the form-field's showError() decides; outside a form-field but inside an CngxErrorAggregator the aggregator's shouldShow() decides; standalone it stays false.

focused#Signal
Readonly

true while focus is inside the host subtree.

id#Signal
Readonly

Stable unique host id, prefixed per CngxInteractiveGroupHostOptions.uidPrefix.

resolvedState#Signal
Readonly

Effective async state: the explicit state option wins over a discovered ancestor CNGX_STATEFUL.

Methods#

handleFocusIn#void

Bind to the host's (focusin) listener.

handleFocusOut#void

Bind to the host's (focusout) listener; marks the surrounding field as touched.