Open akash-int opened 4 years ago
Try this
const ParentClass = () => {
const showForm = (event) => {
console.log('showForm');
};
return(
<OrganizationChart
ref={orgchart}
datasource={ds}
NodeTemplate={(nodeData) => <MyNode nodeData={nodeData.nodeData} showForm={showForm} />}
/>
);
}
const MyNode = ({nodeData, showForm}) => {
return (
<button onClick={showForm}>Click me</button>
)
}
@InfinityKn you rock mate
Hi @dabeng I want to achieve this kind of functionally. Can you please help me out. I'm new to react & unable to find any solution.
// parent class const ParentClass = () => { const showForm = (event) => { console.log('showForm'); };
}
// NodeTemplate class const MyNode = () => {