IGroupItemProvide

interface
Group & Selection

Runtime injection provided by each item component to its descendants — exposes identity, selection state, toggle and a back-reference to the parent group.

TypeScript

Definition

The TypeScript interface definition as found in the origam source. Click the copy icon to copy the snippet.

typescript

API

Properties

Every property declared by this interface, with its type, optionality and default.

id
required
number
Unique numeric id assigned by the parent group on registration.
isSelected
required
Ref<boolean>
Reactive flag — true when this item is in the group selection.
toggle
required
() => void
Toggles the selected state of this item inside the group.
select
required
(value: boolean) => void
Explicitly sets the selected state to the given boolean.
selectedClass
required
Ref<Array<(string | undefined)> | false>
Resolved CSS class list to apply when selected, or false when not selected.
value
required
Ref<unknown>
Reactive ref wrapping the item value (mirrors the value prop).
disabled
required
Ref<boolean | undefined>
Reactive disabled state — true prevents selection.
group
required
IGroupProvide
Back-reference to the parent group provide object.

Usage

Examples

Ready-to-paste code snippets using this interface.

Injecting the group-item provide in a child component

typescript