ITreeviewProvide
interface
Component Context
Context object provided by OrigamTreeview to all descendant OrigamTreeviewNode components via Vue inject. Exposes reactive state accessors and mutation handlers without prop-drilling.
TypeScript
Definition
The TypeScript interface definition as found in the origam source. Click the copy icon to copy the snippet.
API
Properties
Every property declared by this interface, with its type, optionality and default.
- toggleExpandedrequired(id: string) => void
- Expand or collapse the branch node with the given id.
- toggleSelectedrequired(id: string) => void
- Select or deselect the node with the given id according to the current selectMode.
- isExpandedrequired(id: string) => boolean
- Returns true if the branch node with the given id is currently expanded.
- isSelectedrequired(id: string) => boolean
- Returns true if the node with the given id is currently selected.
- selectModerequiredComputedRef<TTreeviewSelectMode>
- Reactive selection strategy (none / single / multiple) forwarded from ITreeviewProps.
- selectableNodesrequiredComputedRef<TTreeviewSelectableNodes>
- Reactive filter controlling which node types (all / leaf / branch) can be selected.
- showLinesrequiredComputedRef<boolean>
- Reactive flag controlling whether vertical guide lines are rendered.
- expandOnClickrequiredComputedRef<boolean>
- Reactive flag controlling whether a row click expands/collapses the branch.
- colorrequiredComputedRef<string | undefined>
- Reactive color intent forwarded to child nodes for consistent selection highlight.
Ecosystem
Used by
Components and composables that extend or consume this interface.
Usage
Examples
Ready-to-paste code snippets using this interface.
Injecting the treeview context in a custom node renderer