INestedProps

interface
Data & State

Selection and open-state contract for tree-like and nested list components — governs item selection strategy, expand/collapse strategy, current selection and opened nodes.

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.

selectStrategy
TSelectStrategy | TSelectStrategyFn
Named selection strategy ("single-leaf", "leaf", "independent", "classic") or a custom function that determines which nodes are selectable and how selection propagates through the tree.
openStrategy
TOpenStrategy | TOpenStrategyFns
Named open/expand strategy ("single", "multiple", "list") or a set of custom handler functions that control which nodes can be open simultaneously.
selected
Array<unknown>
Array of currently selected node values. Drives v-model:selected on tree and list components.
opened
Array<unknown>
Array of currently expanded node values. Drives v-model:opened on tree and list components.
mandatory
boolean
When true, at least one item must remain selected at all times — deselecting the last item is prevented.

Ecosystem

Used by

Components and composables that extend or consume this interface.

Usage

Examples

Ready-to-paste code snippets using this interface.

Extending the interface for a tree component

typescript