title: How to call component on onclick of node from react-d3-tree
body: <pre><code>        class WorkflowDesign extends React.PureComponent {
            state = {};
  
            componentDidMount() {
              const dimensions = this.treeContainer.getBoundingClientRect();
              this.setState({
                translate: {
                  x: dimensions.width / 2,
                  y: dimensions.height / 2
                }
              });
            }
  
  
            render() {
              return (
                &lt;div style={containerStyles} ref={tc =&gt; (this.treeContainer = tc)}&gt;
                  &lt;Tree
                    data={this.props.data}
                    translate={this.state.translate}
                    orientation={'vertical'}
                    collapsible={false}
                    directed={false}
                    onClick={(nodeData, evtData) =&gt; {
                      if (nodeData.type === 'FLOW') {
                        this.props.getFlowNodeStartId(nodeData);
                      }
                      return;
                    }}
  
                    allowForeignObjects
                    nodeLabelComponent={{
                      render: &lt;CollapsedBreadcrumbs data={this.props.breadcrumbtartNodeId} /&gt;,
                      foreignObjectWrapper: {
                        y: 24
                      }
                    }
                    }
  
                  /&gt;
                &lt;/div&gt;
              );
            }
          }
  </code></pre>
  
  <blockquote>
    <p>I have tried with [react-d3-tee][1] but its not allowing me to call component inside onclick, So please help me out how to call component on onclick with some conditions, I have mention on the above code</p>
  </blockquote>
  
  <p><strong>I wanted to call component on onclick which I have wrote onclick function with some condition</strong>                                            </p>
  
  <pre><code>      [1]: https://www.npmjs.com/package/react-d3-tree
  </code></pre>