Hide children nodes seems to performe better on large traces

This commit is contained in:
Willian Mitsuda 2021-11-02 21:54:25 -03:00
parent fd5b884caa
commit 596ed93e0e
1 changed files with 6 additions and 2 deletions

View File

@ -78,8 +78,12 @@ const TraceItem: React.FC<TraceItemProps> = ({
</span>
</div>
</div>
{expanded && t.children && (
<div className={`pl-10 ${last ? "" : "border-l"} space-y-3`}>
{t.children && (
<div
className={`pl-10 ${last ? "" : "border-l"} space-y-3 ${
expanded ? "" : "hidden"
}`}
>
{t.children.map((tc, i, a) => (
<TraceItem
key={i}