Refactor code hiding logic in parameterComponent and EditNodeModal

This commit is contained in:
anovazzi1 2024-03-03 18:50:31 -03:00
commit 189b40fe3c
2 changed files with 3 additions and 2 deletions

View file

@ -304,7 +304,7 @@ export default function ParameterComponent({
ref={ref}
className={
"relative mt-1 flex w-full flex-wrap items-center justify-between bg-muted px-5 py-2" +
(name.includes("code") && type==="code" ? " hidden " : "")
((name==="code" && type==="code") || (name.includes("code") && proxy) ? " hidden " : "")
}
>
<>

View file

@ -165,7 +165,8 @@ const EditNodeModal = forwardRef(
)
) ?? false;
return (
<TableRow key={index} className="h-10">
<TableRow key={index} className={"h-10 " + ((templateParam==="code" && myData.node?.template[templateParam].type==="code") || (templateParam.includes("code") && myData.node?.template[templateParam].proxy) ? " hidden " : "")
}>
<TableCell className="truncate p-0 text-center text-sm text-foreground sm:px-3">
<ShadTooltip
content={