-
Notifications
You must be signed in to change notification settings - Fork 28
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Unable to use React components within the node HTML #38
Comments
Hello Peter, I realized yesterday that the treeviz-react wrapper is really broken. |
OK thanks Pierre, not to worry. We'll explore other ways of incorporating, I'm sure we can work something out. If viable, I expect we will share it back to you if you wanted? Thanks, Peter |
Oh that would be awesome, please do @PeterBowater 😀 |
Hey Guys! Did you find a solution for this or not yet? @PeterBowater @PierreCapo Is there a way to insert a React component like a Material ui icon to html template? For example something like this: |
I found a solution for this problem. You have to |
HI Pierre,
Was hoping you could shed some light here. In the demo code you have this for the renderNode parameter of the TreeViz call:
renderNode={(node) =>
<div style="height:${node.settings.nodeHeight}px;display:flex;align-items:center;margin-left:12px">Node name: ${node.data.text_1}</div>
}
Is there an accepted way to return a React component rather than constructing bare HTML?
If not, do you think it is possible it could be updated to do so?
Thanks very much,
Peter.
The text was updated successfully, but these errors were encountered: