Skip to main content

IRenderItemArgs

@spartanfx/react v1.2.2


@spartanfx/react / index / IRenderItemArgs

Interface: IRenderItemArgs<T>

Arguments passed to custom item renderer function.

Type Parameters

T

T = any

Properties

Required

PropertyTypeDescription
depthnumberDepth level of the node
hasChildrenbooleanWhether the node has children
isExpandedbooleanWhether the node is currently expanded
isSelectedbooleanWhether the node is currently selected
nodeITreeNode<T>The tree node being rendered
select() => voidFunction to select the node
toggleExpand() => voidFunction to toggle node expansion

Advanced & escape hatches

PropertyTypeDescription
dragHandleProps?anyProps to spread on draggable elements (if drag & drop enabled)