Skip to content

TreeConfig

Configuration options for the tree plugin.

const grid = document.querySelector('tbw-grid');
grid.plugins = [
new TreePlugin({
childrenField: 'subItems',
defaultExpanded: true,
indentWidth: 24,
animation: 'slide',
}),
];
PropertyTypeDescription
childrenField?stringField name containing child rows (default: ‘children’)
autoDetect?booleanAuto-detect tree structure from data (default: true)
defaultExpanded?booleanWhether nodes are expanded by default (default: false)
indentWidth?numberIndentation width per level in pixels (default: 20)
showExpandIcons?booleanShow expand/collapse icons (default: true)
treeColumn?stringField 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?ExpandCollapseAnimationAnimation style for expanding/collapsing tree nodes. - false: No animation - 'slide': Slide animation (default) - 'fade': Fade 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