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

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}