bkrem / react-d3-tree

:deciduous_tree: React component to create interactive D3 tree graphs
https://bkrem.github.io/react-d3-tree
MIT License
1.09k stars 270 forks source link

Why does this method "renderCustomNodeElement" not work? #392

Closed flyinfly closed 2 years ago

flyinfly commented 2 years ago

like this:

<Tree
    data={orgChart}
    rootNodeClassName="node__root"
    branchNodeClassName="node__branch"
    leafNodeClassName="node__leaf"
    translate={{x:50, y:250}}
    nodeSize={{x:150, y:80}}
    renderCustomNodeElement={(node) => {
        return <div style={{color: 'black'}}>11111</div>
    }}
  />

It's doesn't work!