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.
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.
- toggleExpandedrequis(id: string) => void
- Expand or collapse the branch node with the given id.
- toggleSelectedrequis(id: string) => void
- Select or deselect the node with the given id according to the current selectMode.
- isExpandedrequis(id: string) => boolean
- Returns true if the branch node with the given id is currently expanded.
- isSelectedrequis(id: string) => boolean
- Returns true if the node with the given id is currently selected.
- selectModerequisComputedRef<TTreeviewSelectMode>
- Reactive selection strategy (none / single / multiple) forwarded from ITreeviewProps.
- selectableNodesrequisComputedRef<TTreeviewSelectableNodes>
- Reactive filter controlling which node types (all / leaf / branch) can be selected.
- showLinesrequisComputedRef<boolean>
- Reactive flag controlling whether vertical guide lines are rendered.
- expandOnClickrequisComputedRef<boolean>
- Reactive flag controlling whether a row click expands/collapses the branch.
- colorrequisComputedRef<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