UNPKG

@senyao-design-system/magic-tree

Version:

A tree component implemented with Konva for handling large datasets.

10 lines (8 loc) 601 B
import { default as React } from 'react'; import { MagicTreeProps } from '../types'; /** * The main MagicTree component. * It uses Konva to render a tree structure, optimized for large datasets via virtualization. * @template T - The type of custom data associated with each tree node. */ export declare function MagicTree<T extends Record<string, unknown>>({ data, expandedKeys, onExpand, nodeHeight, width: initialWidth, height: initialHeight, renderNodeContent, onNodeClick, onNodeHover, onLoadData, onNodeDragStart, icon, iconSize, showNodeTooltip, }: MagicTreeProps<T>): React.ReactElement;