TreeItemTemplateContext

Specifies the full per-row context passed to the <TreeViewNodes> render-prop.

Props

The following table outlines the props for the TreeItemTemplateContext:

NameTypeDefaultDescription
beginEdit
( ) => void
-

Specifies the function that opens the editor for current row.

checkState
'Unchecked'

Specifies the tri-state checkbox state for the row.

depth
number
0

Specifies the 0-indexed depth in the tree.

disabled
boolean
false

Specifies whether the node is disabled.

expanded
boolean
false

Specifies whether the node is currently expanded.

id
string | number
-

Specifies the resolved node id.

isEditing
boolean
false

Specifies whether the row's editor is currently open

isLeaf
boolean
true

Specifies whether the node has no children.

item
unknown
-

Specifies the original item.

loading
boolean
-

Specifies whether the row's children are currently being fetched.

selected
boolean
false

Specifies whether the node is currently selected.