IGroupProvide
interface
Group & Selection
Runtime injection provided by a group component to all its item descendants — exposes registration, selection control, navigation and the full item list.
TypeScript
Définition
La définition TypeScript de l'interface telle que trouvée dans le code source d'origam. Cliquez sur l'icône de copie pour copier l'extrait.
API
Propriétés
Chaque propriété déclarée par cette interface, avec son type, son caractère optionnel et sa valeur par défaut.
- registerrequis(item: IGroupItem, cmp: ComponentInternalInstance) => void
- Registers a new item in the group; called by each item on mount.
- unregisterrequis(id: number) => void
- Removes an item from the group by its numeric id; called on unmount.
- selectrequis(id: number, value: boolean) => void
- Sets the selected state of a specific item by id.
- selectedrequisRef<Readonly<Array<number>>>
- Reactive list of currently selected item ids.
- isSelectedrequis(id: number) => boolean
- Returns true if the item with the given id is currently selected.
- prevrequis() => number | undefined
- Selects the previous item in registration order (wraps around).
- nextrequis() => number | undefined
- Selects the next item in registration order (wraps around).
- selectedClassrequisRef<string | undefined>
- CSS class applied to selected items, reactive to the group-level prop.
- itemsrequisComputedRef<Array<{ id: number value: unknown disabled: boolean | undefined domId?: string }>>
- Computed list of all registered items with their id, value and disabled state.
- disabledrequisRef<boolean | undefined>
- Whether the entire group is disabled.
- getItemIndexrequis(value: unknown) => number
- Returns the registration index of the item whose value matches the argument, or -1.
Usage
Exemples
Extraits de code prêts à coller utilisant cette interface.
Injecting the group provide in an item component