diff --git a/src/components/TreeNode.tsx b/src/components/TreeNode.tsx index 0b9ea47..aab606f 100644 --- a/src/components/TreeNode.tsx +++ b/src/components/TreeNode.tsx @@ -88,15 +88,17 @@ const nodeLines = css` } `; -function TreeNode({ children, label, className }: TreeNodeProps) { - return ( -
  • - {label} - {React.Children.count(children) > 0 && ( - - )} -
  • - ); -} +const TreeNode = React.forwardRef( + ({ children, label, className }, ref) => { + return ( +
  • + {label} + {React.Children.count(children) > 0 && ( + + )} +
  • + ); + } +); export default TreeNode;