Interface CustomNodeElementProps

The properties that are passed to the user-defined renderCustomNodeElement render function.

interface CustomNodeElementProps {
    addChildren: AddChildrenFunction;
    hierarchyPointNode: HierarchyPointNode<TreeNodeDatum>;
    nodeDatum: TreeNodeDatum;
    onNodeClick: SyntheticEventHandler;
    onNodeMouseOut: SyntheticEventHandler;
    onNodeMouseOver: SyntheticEventHandler;
    toggleNode: () => void;
}

Properties

addChildren: AddChildrenFunction

The Node class's internal addChildren handler.

hierarchyPointNode: HierarchyPointNode<TreeNodeDatum>

The D3 HierarchyPointNode representation of the node, which wraps nodeDatum with additional properties.

nodeDatum: TreeNodeDatum

The full datum of the node that is being rendered.

The onNodeClick handler defined for Tree (if any).

onNodeMouseOut: SyntheticEventHandler

The onNodeMouseOut handler defined for Tree (if any).

onNodeMouseOver: SyntheticEventHandler

The onNodeMouseOver handler defined for Tree (if any).

toggleNode: () => void

Toggles the expanded/collapsed state of the node.

Provided for customized control flow; e.g. if we want to toggle the node when its label is clicked instead of the node itself.