You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
@Parya-Jafari - was doing some checking in the index file. You are indeed correct that an empty array ([]) is neither null nor undefined as per the ternary operator test in index.tsx file. You are right it might be useful to change the expression to also check for empty array. If in your JSON object etc. you remove the child object entirely class name will change to node__leaf
Are you reporting a bug, or opening a feature request?
I am reporting a bug.
What is the actual behavior/output?
Setting
leafNodeClassName
onTree
should attach the providedclassName
to leaf nodes on the dom.What is the behavior/output you expect?
When a node's
children
is an empty array[]
it is not properly identified as a leaf node.Can you consistently reproduce the issue?
Yes
What version of react-d3-tree are you using?
3.6.1
Please find more information on my comment on an existing Closed Issue
The text was updated successfully, but these errors were encountered: