bkrem/react-d3-tree

How to use non-copyable objects as data?

khokm opened this issue · 0 comments

I have a following tree structure:

interface Node extends RawNodeDatum {
children: Node[];
foo();
}

But d3 makes a copy of data when converting RawNodeDatum to TreeNodeDatum, so the foo method is lost in resulting TreeNodeDatum object.