ubc-carnap-team / Rudolf

Truth Tree Widget for Carnap
2 stars 3 forks source link

D3 tree #8

Closed kylemas closed 5 years ago

kylemas commented 5 years ago

Type '{ data: TreeNode[]; onClick: (item: TreeNode) => any; render: (item: TreeNode) => Element; }' is not assignable to type 'IntrinsicAttributes & IntrinsicClassAttributes<Component<ReactD3TreeProps, any, any>> & Readonly & Readonly<{ children?: ReactNode; }>'. Property 'render' does not exist on type 'IntrinsicAttributes & IntrinsicClassAttributes<Component<ReactD3TreeProps, any, any>> & Readonly & Readonly<{ children?: ReactNode; }>'.ts(2322)

55 |         <Tree
56 |           data={[tree]}

57 | onClick={(item: TreeNode) => handleNodeClick(item)} | ^ 58 | render={(item: TreeNode) => NodeView(item, selectedNode === item)} 59 | /> 60 | <ControlWidget {...{ selectedNode, resolveNode, closeBranch }} />

kylemas commented 5 years ago

Hey Tristan, I was able to resolve the issues by commenting out the render prop being passed onto the but the select function is not working. I'll take a further look at how we can implement this in the D3 Tree structure since it doesn't have a "render" prop like in React Vertical Tree.

McTano commented 5 years ago

I'm having a play around with this but it seems harder than I thought it would be to get it looking similar to before.