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> </span>
</div> </div>
</div> </div>
{expanded && t.children && ( {t.children && (
<div className={`pl-10 ${last ? "" : "border-l"} space-y-3`}> <div
className={`pl-10 ${last ? "" : "border-l"} space-y-3 ${
expanded ? "" : "hidden"
}`}
>
{t.children.map((tc, i, a) => ( {t.children.map((tc, i, a) => (
<TraceItem <TraceItem
key={i} key={i}