/syncfusion-javascript:syncfusion-javascript-treeviewfrom Syncfusion JavaScript UI Controls
Implement hierarchical tree structures with Syncfusion JavaScript TreeView component for selection, editing, and drag-drop functionality. Use this skill when building tree navigation interfaces, displaying hierarchical data, implementing node selection and checkboxes, performing node manipulation (add/remove/update), and customizing tree templates. Covers data binding with local and remote data sources, DataManager integration, node events, API methods, and properties.
Ships in Syncfusion JavaScript UI Controls. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
Read when SKILL.md points to them.
The TreeView component is a powerful navigation control for displaying hierarchical data in a tree structure with advanced capabilities including data binding, multi-selection, checkboxes, node editing, drag-and-drop, and customizable templates.
Use this skill when you need to:
The TreeView supports:
import { enableRipple } from '@syncfusion/ej2-base';
import { TreeView } from '@syncfusion/ej2-navigations';
enableRipple(true);
// Define hierarchical data
let treeData = [
{
nodeId: '01',
nodeText: 'Documents',
nodeChild: [
{ nodeId: '01-01', nodeText: 'Reports.pdf' },
{ nodeId: '01-02', nodeText: 'Proposals.docx' }
]
},
{
nodeId: '02',
nodeText: 'Images',
expanded: true,
nodeChild: [
{ nodeId: '02-01', nodeText: 'photo1.jpg' },
{ nodeId: '02-02', nodeText: 'photo2.jpg' }
]
}
];
// Initialize TreeView
let treeView = new TreeView({
fields: {
dataSource: treeData,
id: 'nodeId',
text: 'nodeText',
child: 'nodeChild'
}
});
treeView.appendTo('#tree');
1. fields (FieldsSettingsModel)
Specifies data source and field mapping for TreeView nodes.
let treeView = new TreeView({
fields: {
dataSource: data,
id: 'nodeId',
text: 'nodeText',
child: 'nodeChild',
parentID: 'pid',
hasChildren: 'hasChild',
expanded: 'isExpanded',
selected: 'isSelected',
isChecked: 'checked',
tooltip: 'tooltipText',
iconCss: 'icon',
imageUrl: 'image',
htmlAttributes: 'attrs',
navigateUrl: 'url',
selectable: 'isSelectable'
}
});
2. selectedNodes (string[], default: [])
Array of IDs representing currently selected nodes.
let treeView = new TreeView({
fields: { dataSource: data, id: 'id', text: 'name', child: 'child' },
selectedNodes: ['01', '02'] // Pre-select nodes
});
// Get selected nodes
console.log(treeView.selectedNodes); // ['01', '02']
// Set selected nodes programmatically
treeView.selectedNodes = ['03', '04'];
treeView.dataBind();
3. checkedNodes (string[], default: [])
Array of IDs representing currently checked nodes.
let treeView = new TreeView({
fields: { dataSource: data, id: 'id', text: 'name', child: 'child' },
showCheckBox: true,
checkedNodes: ['01', '03'] // Pre-check nodes
});
// Get checked nodes
console.log(treeView.checkedNodes);
4. expandedNodes (string[], default: [])
Array of IDs representing expanded nodes.
let treeView = new TreeView({
fields: { dataSource: data, id: 'id', text: 'name', child: 'child' },
expandedNodes: ['01', '02'] // Expand specific nodes
});
5. showCheckBox (boolean, default: false)
Display CheckBoxes in TreeView for multi-select.
let treeView = new TreeView({
fields: { dataSource: data, id: 'id', text: 'name', child: 'child' },
showCheckBox: true // Enable checkboxes
});
6. disabled (boolean, default: false)
Disable all TreeView interactions.
let treeView = new TreeView({
fields: { dataSource: data, id: 'id', text: 'name', child: 'child' },
disabled: false // Set to true to disable
});
// Enable/disable dynamically
treeView.disabled = true;
treeView.dataBind();
7. allowDragAndDrop (boolean, default: false)
Enable drag and drop of nodes.
let treeView = new TreeView({
fields: { dataSource: data, id: 'id', text: 'name', child: 'child' },
allowDragAndDrop: true // Enable drag-drop
});
8. allowEditing (boolean, default: false)
Enable inline editing of node text.
let treeView = new TreeView({
fields: { dataSource: data, id: 'id', text: 'name', child: 'child' },
allowEditing: true // Enable inline editing
});
9. allowMultiSelection (boolean, default: false)
Enable multi-selection of nodes with Ctrl/Cmd.
let treeView = new TreeView({
fields: { dataSource: data, id: 'id', text: 'name', child: 'child' },
allowMultiSelection: true
});
10. allowTextWrap (boolean, default: false)
Allow text to wrap to multiple lines in nodes.
let treeView = new TreeView({
fields: { dataSource: data, id: 'id', text: 'name', child: 'child' },
allowTextWrap: true
});
11. autoCheck (boolean, default: true)
Auto-check/uncheck parent and child nodes when checking parent.
let treeView = new TreeView({
fields: { dataSource: data, id: 'id', text: 'name', child: 'child' },
showCheckBox: true,
autoCheck: true // Parent-child auto-check enabled
});
12. checkDisabledChildren (boolean, default: true)
Check disabled children when parent is checked.
let treeView = new TreeView({
fields: { dataSource: data, id: 'id', text: 'name', child: 'child' },
showCheckBox: true,
checkDisabledChildren: true
});
13. checkOnClick (boolean, default: false)
Check/uncheck node on clicking node text (instead of just checkbox).
let treeView = new TreeView({
fields: { dataSource: data, id: 'id', text: 'name', child: 'child' },
showCheckBox: true,
checkOnClick: true // Click text to check/uncheck
});
14. fullRowSelect (boolean, default: true)
Select entire row instead of just text.
let treeView = new TreeView({
fields: { dataSource: data, id: 'id', text: 'name', child: 'child' },
fullRowSelect: true // Full row is selectable
});
15. fullRowNavigable (boolean, default: false)
Navigate entire row with arrow keys instead of text only.
let treeView = new TreeView({
fields: { dataSource: data, id: 'id', text: 'name', child: 'child' },
fullRowNavigable: true
});
16. loadOnDemand (boolean, default: true)
Lazy load child nodes on demand (expand node).
let treeView = new TreeView({
fields: {
dataSource: data,
id: 'id',
text: 'name',
child: 'child',
hasChildren: 'hasChild'
},
loadOnDemand: true // Load children on expand
});
17. expandOn (ExpandOnSettings, default: 'Auto')
Action that expands/collapses nodes: Auto, Click, DblClick, None.
let treeView = new TreeView({
fields: { dataSource: data, id: 'id', text: 'name', child: 'child' },
expandOn: 'Click' // Single click to expand, double click to collapse
});
18. sortOrder (SortOrder, default: 'None')
Sort order for nodes: None, Ascending, Descending.
let treeView = new TreeView({
fields: { dataSource: data, id: 'id', text: 'name', child: 'child' },
sortOrder: 'Ascending' // Sort nodes alphabetically
});
19. dragArea (HTMLElement | string, default: null)
Target element for drag and drop restriction.
let treeView = new TreeView({
fields: { dataSource: data, id: 'id', text: 'name', child: 'child' },
allowDragAndDrop: true,
dragArea: '#dragContainer' // Restrict drag to this element
});
20. animation (NodeAnimationSettingsModel)
Animation settings for expand/collapse.
let treeView = new TreeView({
fields: { dataSource: data, id: 'id', text: 'name', child: 'child' },
animation: {
expand: {
effect: 'SlideDown',
duration: 400,
easing: 'linear'
},
collapse: {
effect: 'SlideUp',
duration: 400,
easing: 'linear'
}
}
});
21. cssClass (string, default: '')
Custom CSS class for TreeView styling.
let treeView = new TreeView({
fields: { dataSource: data, id: 'id', text: 'name', child: 'child' },
cssClass: 'custom-tree' // Apply custom CSS
});
// CSS
// .custom-tree .e-text-content { color: #333; font-weight: bold; }
22. nodeTemplate (string | Function, default: null)
Custom template for rendering nodes.
let treeView = new TreeView({
fields: { dataSource: data, id: 'id', text: 'name', child: 'child' },
nodeTemplate: '<div class="node-content">${name}</div>'
});
// Or with function
let treeView = new TreeView({
fields: { dataSource: data, id: 'id', text: 'name', child: 'child' },
nodeTemplate: (data) => {
return `<div class="custom"><span>${data.name}</span></div>`;
}
});
23. disableHtmlEncode (boolean, default: true)
Render raw HTML in nodes without encoding.
let treeView = new TreeView({
fields: { dataSource: data, id: 'id', text: 'name', child: 'child' },
disableHtmlEncode: true // Render HTML tags
});
24. enableHtmlSanitizer (boolean, default: true)
Sanitize untrusted HTML for security.
let treeView = new TreeView({
fields: { dataSource: data, id: 'id', text: 'name', child: 'child' },
enableHtmlSanitizer: true // Sanitize HTML
});
25. enableRtl (boolean, default: false)
Right-to-left rendering for RTL languages.
let treeView = new TreeView({
fields: { dataSource: data, id: 'id', text: 'name', child: 'child' },
enableRtl: true // Enable RTL layout
});
26. enablePersistence (boolean, default: false)
Persist TreeView state (selected, expanded, checked) between page reloads.
let treeView = new TreeView({
fields: { dataSource: data, id: 'id', text: 'name', child: 'child' },
enablePersistence: true // Persist state
});
Additional Properties (27-31):
1. ensureVisible(node: string | Element): void Make node visible by expanding ancestors and scrolling to it.
let treeView = new TreeView({
fields: { dataSource: data, id: 'id', text: 'name', child: 'child' }
});
treeView.appendTo('#tree');
// Make node 05-02 visible
treeView.ensureVisible('05-02'); // Expands all parent nodes and scrolls to view
2. getNode(node: string | Element): { [key: string]: Object } Get node by ID or element, returns the DOM node element.
// Get node by ID
let nodeElement = treeView.getNode('01-01');
// Get node by element
let element = document.getElementById('node1');
let nodeData = treeView.getNode(element);
3. getTreeData(node?: string | Element): { [key: string]: Object }[] Get updated TreeView data. If ID passed, returns that node's data. Empty string returns all data.
// Get all tree data
let allData = treeView.getTreeData('');
console.log(allData); // Array of all nodes
// Get specific node data
let nodeData = treeView.getTreeData('01');
console.log(nodeData); // [{ id: '01', name: 'Documents', child: [...] }]
// Get child nodes
let childData = treeView.getTreeData('01');
console.log(childData[0].child); // Array of child nodes
4. addNodes(nodes: { [key: string]: Object }[], target?: string | Element, index?: number, preventTargetExpand?: boolean): void Add new nodes to TreeView.
let treeView = new TreeView({
fields: { dataSource: data, id: 'id', text: 'name', child: 'child' }
});
treeView.appendTo('#tree');
// Add nodes to a parent (will be added as children)
treeView.addNodes([
{ id: '03-01', name: 'New Item 1' },
{ id: '03-02', name: 'New Item 2' }
], '03');
// Add at specific index
treeView.addNodes([{ id: '03-03', name: 'Item at index 0' }], '03', 0);
// Add without expanding parent
treeView.addNodes([{ id: '04-01', name: 'Hidden' }], '04', null, true);
5. removeNodes(nodes: string[] | Element[]): void Remove nodes from TreeView.
// Remove by ID
treeView.removeNodes(['01-01', '01-02']);
// Remove by element
let element = document.querySelector('[data-uid="01-01"]');
treeView.removeNodes([element]);
6. moveNodes(sourceNodes: string[] | Element[], target: string | Element, index: number, preventTargetExpand?: boolean): void Move nodes to different parent or position.
// Move nodes to new parent
treeView.moveNodes(['01-01', '01-02'], '03');
// Move to specific index in target
treeView.moveNodes(['01-01'], '03', 0);
// Move without expanding target
treeView.moveNodes(['01-01'], '04', null, true);
7. refreshNode(target: string | Element, newData: { [key: string]: Object }[]): void Refresh/update node content.
// Refresh node with new data
treeView.refreshNode('01', { id: '01', name: 'Updated Documents', child: [] });
// Refresh display without data change
treeView.refreshNode('01');
8. expandAll(nodes?: string[] | Element[], level?: number, excludeHiddenNodes?: boolean, preventAnimation?: boolean): void Expand all or specific nodes.
// Expand all nodes
treeView.expandAll();
// Expand specific nodes
treeView.expandAll(['01', '02', '03']);
// Expand to specific level
treeView.expandAll(null, 2); // Expand 2 levels deep
// Expand without animation
treeView.expandAll(null, null, false, true);
9. collapseAll(nodes?: string[] | Element[], level?: number, excludeHiddenNodes?: boolean): void Collapse all or specific nodes.
// Collapse all nodes
treeView.collapseAll();
// Collapse specific nodes
treeView.collapseAll(['01', '02']);
// Collapse to specific level
treeView.collapseAll(null, 1);
10. checkAll(nodes?: string[] | Element[]): void Check all or specific nodes (checkbox).
// Check all nodes
treeView.checkAll();
// Check specific nodes
treeView.checkAll(['01', '02', '03']);
11. uncheckAll(nodes?: string[] | Element[]): void Uncheck all or specific nodes.
// Uncheck all nodes
treeView.uncheckAll();
// Uncheck specific nodes
treeView.uncheckAll(['01', '02']);
12. getAllCheckedNodes(): string[] Get array of all checked node IDs including children.
let checkedNodeIds = treeView.getAllCheckedNodes();
console.log(checkedNodeIds); // ['01', '01-01', '02', '02-01', '02-02']
13. getDisabledNodes(): string[] Get array of all disabled node IDs.
let disabledNodeIds = treeView.getDisabledNodes();
console.log(disabledNodeIds); // ['03', '04-01']
14. beginEdit(node: string | Element): void Start inline editing mode for a node.
let treeView = new TreeView({
fields: { dataSource: data, id: 'id', text: 'name', child: 'child' },
allowEditing: true
});
treeView.appendTo('#tree');
// Start editing node
treeView.beginEdit('01'); // Node becomes editable
15. updateNode(target: string | Element, newText: string): void Update/rename a node's text.
// Update node text
treeView.updateNode('01', 'Documents (Updated)');
// Or with data object
treeView.updateNode('01', { id: '01', name: 'New Name' });
16. enableNodes(nodes: string[] | Element[]): void Enable previously disabled nodes.
// Enable specific nodes
treeView.enableNodes(['01', '02']);
17. disableNodes(nodes: string[] | Element[]): void Disable nodes (prevent interaction).
// Disable specific nodes
treeView.disableNodes(['03', '04']); // These nodes can't be clicked/selected
18. appendTo(selector?: string | HTMLElement): void Append TreeView to DOM element.
let treeView = new TreeView({
fields: { dataSource: data, id: 'id', text: 'name', child: 'child' }
});
// Append to element with ID
treeView.appendTo('#tree');
// Or append to element reference
treeView.appendTo(document.getElementById('tree'));
19. dataBind(): void Apply pending property changes immediately.
treeView.selectedNodes = ['01', '02'];
treeView.dataBind(); // Apply changes immediately
20. refresh(): void Refresh control and apply pending changes.
treeView.fields.dataSource = newData;
treeView.refresh(); // Refresh with new data
21. destroy(): void Remove component and detach all events.
// Clean up TreeView
treeView.destroy();
Additional Methods (22):
1. created Raised when TreeView is created successfully.
let treeView = new TreeView({
fields: { dataSource: data, id: 'id', text: 'name', child: 'child' },
created: () => {
console.log('TreeView created!');
}
});
2. destroyed Raised when TreeView is destroyed.
treeView.destroyed = () => {
console.log('TreeView destroyed!');
};
3. dataBound Raised when data is populated in TreeView.
let treeView = new TreeView({
fields: { dataSource: data, id: 'id', text: 'name', child: 'child' },
dataBound: (args) => {
console.log('Data bound to TreeView');
}
});
4. dataSourceChanged Raised when data changes (after add, remove, move, etc.).
treeView.dataSourceChanged = (args: DataSourceChangedEventArgs) => {
console.log('Action:', args.action); // 'add', 'remove', 'move', etc.
console.log('Updated data:', args.data);
};
5. actionFailure Raised when any operation fails.
treeView.actionFailure = (args: FailureEventArgs) => {
console.error('Error:', args.error);
};
6. nodeSelecting Raised before node is selected.
treeView.nodeSelecting = (args: NodeSelectEventArgs) => {
console.log('Node selecting:', args.nodeData.name);
if (args.nodeData.id === 'protect-this') {
args.cancel = true; // Prevent selection
}
};
7. nodeSelected Raised after node is selected/unselected.
treeView.nodeSelected = (args: NodeSelectEventArgs) => {
console.log('Node selected:', args.nodeData.name);
console.log('Action:', args.action); // 'select' or 'unselect'
console.log('Interacted:', args.isInteracted);
};
8. nodeClicked Raised when node is clicked.
treeView.nodeClicked = (args: NodeClickEventArgs) => {
console.log('Node clicked:', args.nodeData.name);
console.log('Event:', args.event); // Original click event
};
9. nodeChecking Raised before node is checked/unchecked.
treeView.nodeChecking = (args: NodeCheckEventArgs) => {
console.log('Node checking:', args.nodeData.name);
console.log('Action:', args.action); // 'check' or 'uncheck'
// Prevent checking specific nodes
if (args.nodeData.id === 'read-only') {
args.cancel = true;
}
};
10. nodeChecked Raised after node is checked/unchecked.
treeView.nodeChecked = (args: NodeCheckEventArgs) => {
console.log('Node checked:', args.nodeData.name);
console.log('All checked nodes:', treeView.getAllCheckedNodes());
};
11. nodeExpanding Raised before node expands.
treeView.nodeExpanding = (args: NodeExpandEventArgs) => {
console.log('Node expanding:', args.nodeData.name);
// Prevent expansion
if (args.nodeData.locked) {
args.cancel = true;
}
};
12. nodeExpanded Raised after node expands successfully.
treeView.nodeExpanded = (args: NodeExpandEventArgs) => {
console.log('Node expanded:', args.nodeData.name);
};
13. nodeCollapsing Raised before node collapses.
treeView.nodeCollapsing = (args: NodeExpandEventArgs) => {
console.log('Node collapsing:', args.nodeData.name);
};
14. nodeCollapsed Raised after node collapses.
treeView.nodeCollapsed = (args: NodeExpandEventArgs) => {
console.log('Node collapsed:', args.nodeData.name);
};
15. nodeEditing Raised before node text is edited.
treeView.nodeEditing = (args: NodeEditEventArgs) => {
console.log('Node editing:', args.oldText);
// Prevent editing
if (args.nodeData.locked) {
args.cancel = true;
}
};
16. nodeEdited Raised after node text is edited successfully.
treeView.nodeEdited = (args: NodeEditEventArgs) => {
console.log('Old text:', args.oldText);
console.log('New text:', args.newText);
console.log('Inner HTML:', args.innerHtml);
};
17. nodeDragStart Raised when node drag starts.
treeView.nodeDragStart = (args: DragAndDropEventArgs) => {
console.log('Drag started:', args.draggedNodeData.name);
console.log('Dragged node element:', args.draggedNode);
};
18. nodeDragging Raised continuously while node is being dragged.
treeView.nodeDragging = (args: DragAndDropEventArgs) => {
console.log('Dragging...');
console.log('Current drop target:', args.dropTarget);
// Prevent dropping on specific nodes
if (args.dropTarget.classList.contains('no-drop')) {
args.dropIndicator = 'e-no-drop';
}
};
19. nodeDragStop Raised when node drag stops.
treeView.nodeDragStop = (args: DragAndDropEventArgs) => {
console.log('Drag stopped');
console.log('Drop position:', args.position); // 'Inside', 'Before', 'After'
};
20. nodeDropped Raised when node is dropped successfully.
treeView.nodeDropped = (args: DragAndDropEventArgs) => {
console.log('Dropped on:', args.dropTarget);
console.log('New drop index:', args.dropIndex);
console.log('Drop position:', args.position);
};
21. drawNode Raised before node is rendered.
22. keyPress Raised when keyboard key is pressed on focused node.
All events provide detailed argument objects:
| Event | Argument Class | Key Properties |
|---|---|---|
| dataBound | DataBoundEventArgs | data |
| dataSourceChanged | DataSourceChangedEventArgs | action, data, nodeData |
| actionFailure | FailureEventArgs | error |
| nodeSelecting/nodeSelected | NodeSelectEventArgs | action, cancel, isInteracted, node, nodeData |
| nodeClicked | NodeClickEventArgs | event, node |
| nodeChecking/nodeChecked | NodeCheckEventArgs | action, cancel, data, isInteracted, node |
| nodeExpanding/nodeExpanded/etc | NodeExpandEventArgs | cancel, isInteracted, node, nodeData |
| nodeEditing/nodeEdited | NodeEditEventArgs | cancel, innerHtml, newText, node, nodeData, oldText |
| nodeDragStart/Dragging/Stop/Dropped | DragAndDropEventArgs | cancel, clonedNode, draggedNode, draggedNodeData, dropIndex, dropIndicator, dropLevel, dropTarget, droppedNode, droppedNodeData, event, position, preventTargetExpand, target |
Maps data source fields to TreeView:
let fields = {
dataSource: dataArray, // Array or DataManager
id: 'nodeId', // ID field
text: 'nodeText', // Display text field
child: 'nodeChild', // Child nodes field (hierarchical)
parentID: 'parentId', // Parent ID field (self-referential)
hasChildren: 'hasChild', // Boolean field for has children
expanded: 'isExpanded', // Expansion state field
selected: 'isSelected', // Selection state field
isChecked: 'checked', // Checkbox state field
iconCss: 'icon', // Icon CSS class field
imageUrl: 'image', // Image URL field
tooltip: 'tooltipText', // Tooltip field
htmlAttributes: 'attrs', // HTML attributes field
navigateUrl: 'url', // Navigation URL field
selectable: 'isSelectable', // Selectable field
query: new Query() // DataManager query
};
let animation = {
expand: {
effect: 'SlideDown', // Animation effect
duration: 400, // Duration in ms
easing: 'linear' // Easing function
},
collapse: {
effect: 'SlideUp',
duration: 400,
easing: 'linear'
}
};
See references/data-binding.md for complete data binding guide including:
See references/node-selection-and-checking.md for:
See references/node-manipulation.md for:
See references/node-editing-and-interaction.md for:
See references/customization-and-styling.md for:
See references/accessibility-and-advanced.md for:
let fileData = [
{ id: 1, name: 'Documents', hasChild: true },
{ id: 2, pid: 1, name: 'Reports.pdf' },
{ id: 3, pid: 1, name: 'Budget.xlsx' },
{ id: 4, name: 'Images', hasChild: true },
{ id: 5, pid: 4, name: 'Photos', hasChild: true },
{ id: 6, pid: 5, name: 'Vacation.jpg' }
];
let treeView = new TreeView({
fields: { dataSource: fileData, id: 'id', text: 'name', parentID: 'pid', hasChildren: 'hasChild' }
});
treeView.appendTo('#tree');
let data = [
{ id: 1, name: 'Fruits', hasChild: true },
{ id: 2, pid: 1, name: 'Apple' },
{ id: 3, pid: 1, name: 'Banana' },
{ id: 4, name: 'Vegetables', hasChild: true },
{ id: 5, pid: 4, name: 'Carrot' }
];
let treeView = new TreeView({
fields: { dataSource: data, id: 'id', text: 'name', parentID: 'pid', hasChildren: 'hasChild' },
showCheckBox: true,
autoCheck: true
});
treeView.appendTo('#tree');
document.getElementById('getChecked').addEventListener('click', () => {
let checkedNodes = treeView.getAllCheckedNodes();
console.log('Selected items:', checkedNodes);
});
let treeView = new TreeView({
fields: { dataSource: data, id: 'id', text: 'name', child: 'child' },
allowEditing: true,
nodeEditing: (args) => {
// Validate during editing
if (args.newText.length < 3) {
args.cancel = true;
alert('Name must be at least 3 characters');
}
},
nodeEdited: (args) => {
console.log(`Renamed: "${args.oldText}" → "${args.newText}"`);
}
});
treeView.appendTo('#tree');
document.getElementById('editBtn').addEventListener('click', () => {
let selectedNode = treeView.selectedNodes[0];
if (selectedNode) {
treeView.beginEdit(selectedNode);
}
});
let treeView = new TreeView({
fields: { dataSource: data, id: 'id', text: 'name', child: 'child' }
});
treeView.appendTo('#tree');
document.getElementById('addBtn').addEventListener('click', () => {
let parent = treeView.selectedNodes[0] || '1';
treeView.addNodes([
{ id: Date.now(), name: 'New Item' }
], parent);
});
document.getElementById('removeBtn').addEventListener('click', () => {
let selected = treeView.selectedNodes;
if (selected.length > 0) {
treeView.removeNodes(selected);
}
});
let treeView = new TreeView({
fields: { dataSource: data, id: 'id', text: 'name', child: 'child' },
allowDragAndDrop: true,
nodeDragStart: (args) => {
console.log('Started dragging:', args.draggedNodeData.name);
},
nodeDragging: (args) => {
// Prevent dropping on readonly nodes
if (args.dropTarget?.classList.contains('readonly')) {
args.dropIndicator = 'e-no-drop';
}
},
nodeDropped: (args) => {
console.log(`Moved "${args.draggedNodeData.name}" to new parent`);
}
});
treeView.appendTo('#tree');
Q: TreeView not showing data?
id, text, and child/parentID fields are correct.Q: Parent/child auto-check not working?
autoCheck: true and ensure showCheckBox: true is enabled.Q: Performance issues with large datasets?
loadOnDemand: true for lazy loading. This loads children only when expanded.Q: Events not firing?
addEventListener for dynamic setup.Q: How to persist selected state?
enablePersistence: true to save state in browser storage.Q: Drag-drop not working?
allowDragAndDrop: true and ensure nodes have proper IDs.| Feature | Reference File | Focus |
|---|---|---|
| Getting Started | getting-started.md | Installation, setup, basic initialization, dependencies, themes, quick examples |
| Feature | Reference File | Focus |
|---|---|---|
| Data Binding | data-binding.md | Hierarchical data, self-referential data, remote/OData services, DataManager, lazy loading, best practices |
| Feature | Reference File | Focus |
|---|---|---|
| Node Selection & Checking | node-selection-and-checking.md | Single/multi-select, checkboxes, auto-check behavior, selection events, keyboard shortcuts |
| Node Editing & Interaction | node-editing-and-interaction.md | Inline editing, validation, click handlers, keyboard navigation, advanced interactions |
| Feature | Reference File | Focus |
|---|---|---|
| Node Manipulation (CRUD) | node-manipulation.md | Adding, removing, updating, moving nodes, getting node data, bulk operations |
| Feature | Reference File | Focus |
|---|---|---|
| Customization & Styling | customization-and-styling.md | CSS classes, themes, templates, level-based styling, icons, checkboxes, RTL support |
| Feature | Reference File | Focus |
|---|---|---|
| Advanced & Accessibility | accessibility-and-advanced.md | Drag-drop, filtering, sorting, context menus, keyboard navigation, ARIA, performance optimization |
Metadata
references/accessibility-and-advanced.md (opens in a new tab)references/customization-and-styling.md (opens in a new tab)references/data-binding.md (opens in a new tab)references/getting-started.md (opens in a new tab)references/node-editing-and-interaction.md (opens in a new tab)references/node-manipulation.md (opens in a new tab)references/node-selection-and-checking.md (opens in a new tab)What SKILL.md sets; muted values are Claude Code's defaults
npx claudepluginhub syncfusion/boldcreate-plugins --plugin syncfusion-javascriptOther plugins' skills for the same job
67 skills in this plugin
/syncfusion-javascript-3d-chartCreate interactive 3D charts in Syncfusion TypeScript and JavaScript. Immediately use this skill when user needs to build 3D visualizations, render 3D column/bar charts, configure 3D rotation and depth, visualize data in three dimensions, customize 3D chart appearance, handle 3D interactions, or implement advanced 3D features. Works with TypeScript (webpack/module-based) and JavaScript (CDN/ES5)./syncfusion-javascript-accordionBuild collapsible navigation panels with the Syncfusion TypeScript Accordion component. Use this skill when implementing vertical accordion menus, expanding/collapsing content panels, multi-step wizards, data-driven panels with dynamic content, tabbed navigation alternatives, or nested hierarchical content structures. Covers initialization, expand modes, animations, icons, templates, styling, data binding, and advanced use cases like form wizards./syncfusion-javascript-accumulation-chartImplements Syncfusion JavaScript accumulation charts (Pie, Doughnut, Funnel, Pyramid) for proportional and percentage-based visualizations. Use when displaying categorical or proportional data. Covers legend and label configuration, interactivity, accessibility, and customization. Works with TypeScript (modules) and JavaScript (CDN/ES5).