ISelectionGroupContext

interface
Form & Input

Provide/inject context passed from SelectionControlGroup to each child SelectionControl. Exposes the shared reactive modelValue, a forceUpdate trigger for when the parent needs to re-evaluate all children, and an onForceUpdate registration hook for children to subscribe.

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.

modelValue
required
Ref<any>
Shared reactive ref holding the current group selection. Children read and write through this ref; the group synchronises changes to the parent v-model.
forceUpdate
required
() => void
Called by the group when an external change requires all children to re-check their checked state (e.g. programmatic clear or reset).
onForceUpdate
required
(fn: () => void) => void
Registration function used by each child to subscribe a callback that runs when forceUpdate is called.

Ecosystem

Used by

Components and composables that extend or consume this interface.

Usage

Examples

Ready-to-paste code snippets using this interface.

Injecting the group context in a custom selection control

typescript