Fix CPU spike when opening PodDetails from MonacoEditor

- Don't mount the children of DrawerParamToggler when closed (default)

Signed-off-by: Sebastian Malton <sebastian@malton.name>
This commit is contained in:
Sebastian Malton committed 2022-06-15 09:24:13 -04:00
1 parent 23f7d438f1
commit 9a42523a24
1 file changed
+5 -3
@@ -38,9 +38,11 @@ export class DrawerParamToggler extends React.Component<DrawerParamTogglerProps,
<Icon material={icon}/>
</div>
</div>
<div className={cssNames("param-content", { open })}>
{children}
</div>
{open && (
<div className={cssNames("param-content", { open })}>
{children}
</div>
)}
</div>
);
}