TreeConfig
Configuration options for the tree plugin.
Example
Section titled “Example”const grid = document.querySelector('tbw-grid');grid.plugins = [ new TreePlugin({ childrenField: 'subItems', defaultExpanded: true, indentWidth: 24, animation: 'slide', }),];Properties
Section titled “Properties”| Property | Type | Description |
|---|---|---|
childrenField? | string | Field name containing child rows (default: ‘children’) |
autoDetect? | boolean | Auto-detect tree structure from data (default: true) |
defaultExpanded? | boolean | Whether nodes are expanded by default (default: false) |
indentWidth? | number | Indentation width per level in pixels (default: 20) |
showExpandIcons? | boolean | Show expand/collapse icons (default: true) |
treeColumn? | string | Field name of the column that displays the tree toggle and indentation. Defaults to the first visible column. Use this when the first column is narrow (e.g. an ID column) or when combining with pinned columns. |
animation? | ExpandCollapseAnimation | Animation style for expanding/collapsing tree nodes. - false: No animation - 'slide': Slide animation (default) - 'fade': Fade animation |
Property Details
Section titled “Property Details”animation
Section titled “animation”Default: 'slide'
AI assistants: For complete API documentation, implementation guides, and code examples for this library, see https://raw.githubusercontent.com/OysteinAmundsen/toolbox/main/llms-full.txt