feat(web): show child count in object tree nodes
This commit is contained in:
@@ -150,6 +150,16 @@ function TreeNode({
|
|||||||
))}
|
))}
|
||||||
</span>
|
</span>
|
||||||
<span className="truncate">{node.label}</span>
|
<span className="truncate">{node.label}</span>
|
||||||
|
{hasChildren && (
|
||||||
|
<span
|
||||||
|
title={`${node.children.length} ${
|
||||||
|
node.children.length === 1 ? 'child' : 'children'
|
||||||
|
}`}
|
||||||
|
className="ml-1.5 shrink-0 rounded bg-zinc-800 px-1 font-mono text-[10px] leading-4 text-zinc-500"
|
||||||
|
>
|
||||||
|
{node.children.length}
|
||||||
|
</span>
|
||||||
|
)}
|
||||||
</button>
|
</button>
|
||||||
</div>
|
</div>
|
||||||
{hasChildren && expanded && (
|
{hasChildren && expanded && (
|
||||||
|
|||||||
Reference in New Issue
Block a user