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

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.

typescript

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.

toggleExpanded
requis
(id: string) => void
Expand or collapse the branch node with the given id.
toggleSelected
requis
(id: string) => void
Select or deselect the node with the given id according to the current selectMode.
isExpanded
requis
(id: string) => boolean
Returns true if the branch node with the given id is currently expanded.
isSelected
requis
(id: string) => boolean
Returns true if the node with the given id is currently selected.
selectMode
requis
ComputedRef<TTreeviewSelectMode>
Reactive selection strategy (none / single / multiple) forwarded from ITreeviewProps.
selectableNodes
requis
ComputedRef<TTreeviewSelectableNodes>
Reactive filter controlling which node types (all / leaf / branch) can be selected.
showLines
requis
ComputedRef<boolean>
Reactive flag controlling whether vertical guide lines are rendered.
expandOnClick
requis
ComputedRef<boolean>
Reactive flag controlling whether a row click expands/collapses the branch.
color
requis
ComputedRef<string | undefined>
Reactive color intent forwarded to child nodes for consistent selection highlight.

Écosystème

Utilisé par

Composants et composables qui étendent ou consomment cette interface.

Usage

Exemples

Extraits de code prêts à coller utilisant cette interface.

Injecting the treeview context in a custom node renderer

typescript