CngxRadioGroupContract
projects/common/interactive/radio/radio-group.token.ts
Referenced by#
Import#
import { CngxRadioGroupContract } from '@cngx/common/interactive'
Description#
Parent-child contract every CngxRadioGroup provides via
useExisting. CngxRadio injects this token (never the
concrete CngxRadioGroup class) so the leaf stays decompose-
ready and free of cyclic type dependencies.
value is a ModelSignal<T | undefined> because the group's
canonical value is two-way-bindable from the consumer
([(value)]) and writable by the leaf when the user picks a
radio (group.value.set(radio.value())). disabled is a
read-only Signal<boolean> projected from the group's own
model<boolean>; leaves combine it with their own per-radio
disabled() to compute radioDisabled. name is the HTML
name attribute applied to all radio inputs in this group -
defaults to a nextUid('cngx-radio-group') value when the
consumer does not supply one.
Index#
Instance Properties#
SignalSignalModelSignalMethods#
consumePendingArrowSelect(value: T)Consume the group's "last interaction was a roving-arrow keydown"
flag. Called by a leaf's (focus) handler - when the flag is
true, the leaf forwards its value to the group's value model
(W3C APG auto-select-on-arrow-nav semantics) and the flag is
cleared so a subsequent Tab-into focus does not double-select.
Returns whether the group actually consumed the flag, so the
leaf can short-circuit redundant work.
T