From 61e50ac68ea4c07e292a79c5084a1de6f70fe18b Mon Sep 17 00:00:00 2001 From: Cristhian Zanforlin Lousa Date: Wed, 27 Sep 2023 23:05:10 -0300 Subject: [PATCH] =?UTF-8?q?=F0=9F=94=A7=20fix(codeTabsComponent):=20remove?= =?UTF-8?q?=20unnecessary=20max-h-48=20class=20from=20codeTabsComponent=20?= =?UTF-8?q?to=20fix=20overflow=20issue=20=F0=9F=94=A7=20fix(keypairListCom?= =?UTF-8?q?ponent):=20add=20mx-2=20class=20to=20keypairListComponent=20whe?= =?UTF-8?q?n=20there=20are=20multiple=20key-value=20pairs=20to=20improve?= =?UTF-8?q?=20spacing=20=F0=9F=94=A7=20fix(keypairListComponent):=20remove?= =?UTF-8?q?=20ref=20parameter=20from=20onChange=20function=20in=20keypairL?= =?UTF-8?q?istComponent=20to=20fix=20unnecessary=20re-rendering=20?= =?UTF-8?q?=F0=9F=94=A7=20fix(keypairListComponent):=20add=20mx-2=20class?= =?UTF-8?q?=20to=20keypairListComponent=20when=20there=20are=20multiple=20?= =?UTF-8?q?key-value=20pairs=20to=20improve=20spacing=20=F0=9F=94=A7=20fix?= =?UTF-8?q?(editNodeModal):=20add=20my-3=20class=20to=20keypairListCompone?= =?UTF-8?q?nt=20when=20there=20are=20multiple=20key-value=20pairs=20to=20i?= =?UTF-8?q?mprove=20spacing=20=F0=9F=94=A7=20fix(types):=20add=20advanced?= =?UTF-8?q?=20property=20to=20KeyPairListComponentType=20to=20support=20ad?= =?UTF-8?q?vanced=20mode=20in=20keypairListComponent?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../components/codeTabsComponent/index.tsx | 2 +- .../components/keypairListComponent/index.tsx | 7 +++--- .../src/modals/EditNodeModal/index.tsx | 15 ++++++++++- src/frontend/src/types/components/index.ts | 25 ++++++++++--------- 4 files changed, 32 insertions(+), 17 deletions(-) diff --git a/src/frontend/src/components/codeTabsComponent/index.tsx b/src/frontend/src/components/codeTabsComponent/index.tsx index adff0bb32..b0326bd30 100644 --- a/src/frontend/src/components/codeTabsComponent/index.tsx +++ b/src/frontend/src/components/codeTabsComponent/index.tsx @@ -682,7 +682,7 @@ export default function CodeTabsComponent({ ) : node.data.node.template[ templateField ].type === "dict" ? ( -
+
{ if (disabled) { @@ -24,7 +25,7 @@ export default function KeypairListComponent({ useEffect(() => { if (JSON.stringify(value) !== JSON.stringify(ref.current)) { ref.current = value; - onChange(value, ref); + onChange(value); } }, [value]); @@ -46,14 +47,14 @@ export default function KeypairListComponent({ return (
1 && editNode ? "my-1" : "", + ref.current?.length > 1 && editNode ? "mx-2 my-1" : "", "flex h-full flex-col gap-3" )} > {ref.current?.map((obj, index) => { return Object.keys(obj).map((key, idx) => { return ( -
+
) : myData.current.node?.template[templateParam] .type === "dict" ? ( -
+
1 + ? "my-3" + : "" + )} + >