David-Desmaisons / Vue.D3.tree

Vue component to display tree based on D3.js layout.
https://david-desmaisons.github.io/Vue.D3.tree/tree
MIT License
874 stars 136 forks source link

Slot Node is not working #53

Closed mquijom closed 4 years ago

mquijom commented 4 years ago

Why does slot node is not working ? Is there any wrong in my code?

`<tree :data="tree" style="height: 100vh" @clickedText="showDetails">

{{data.name}}: {{data.gender}}

`

David-Desmaisons commented 4 years ago

@mquijom node slot is rendered in a svg context so you should return svg dom element as documented in the read.me. https://developer.mozilla.org/en-US/docs/Web/SVG/Element So div is ont valid. You can try text element