From 55513a34a341d3b648bc117cdee5920e36fdc592 Mon Sep 17 00:00:00 2001 From: Cristhian Zanforlin Lousa Date: Fri, 15 Sep 2023 09:27:48 -0300 Subject: [PATCH] =?UTF-8?q?=F0=9F=90=9B=20fix(parameterComponent):=20fix?= =?UTF-8?q?=20logic=20for=20setting=20default=20value=20in=20ParameterComp?= =?UTF-8?q?onent=20=F0=9F=90=9B=20fix(dictComponent):=20fix=20class=20name?= =?UTF-8?q?=20for=20disabled=20input=20in=20DictComponent=20=F0=9F=90=9B?= =?UTF-8?q?=20fix(keypairListComponent):=20remove=20unnecessary=20disabled?= =?UTF-8?q?=20prop=20from=20Input=20component=20in=20KeypairListComponent?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../GenericNode/components/parameterComponent/index.tsx | 5 +++-- src/frontend/src/components/dictComponent/index.tsx | 5 +++-- src/frontend/src/components/keypairListComponent/index.tsx | 2 -- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/src/frontend/src/CustomNodes/GenericNode/components/parameterComponent/index.tsx b/src/frontend/src/CustomNodes/GenericNode/components/parameterComponent/index.tsx index acf643965..5be56e31c 100644 --- a/src/frontend/src/CustomNodes/GenericNode/components/parameterComponent/index.tsx +++ b/src/frontend/src/CustomNodes/GenericNode/components/parameterComponent/index.tsx @@ -384,8 +384,9 @@ export default function ParameterComponent({ disabled={disabled} editNode={false} value={ - convertObjToArray(data.node!.template[name].value) ?? - convertObjToArray(dict) + convertObjToArray(data.node!.template[name].value).length === 0 + ? convertObjToArray(dict) + : convertObjToArray(data.node!.template[name].value) } duplicateKey={errorDuplicateKey} onChange={(newValue: string[]) => { diff --git a/src/frontend/src/components/dictComponent/index.tsx b/src/frontend/src/components/dictComponent/index.tsx index d55f194f5..fd55430bb 100644 --- a/src/frontend/src/components/dictComponent/index.tsx +++ b/src/frontend/src/components/dictComponent/index.tsx @@ -33,10 +33,11 @@ export default function DictComponent({ }} > diff --git a/src/frontend/src/components/keypairListComponent/index.tsx b/src/frontend/src/components/keypairListComponent/index.tsx index b88b17946..d555b1ead 100644 --- a/src/frontend/src/components/keypairListComponent/index.tsx +++ b/src/frontend/src/components/keypairListComponent/index.tsx @@ -82,7 +82,6 @@ export default function KeypairListComponent({ return (