🐛 fix(parameterComponent): fix issue with undefined values in DictComponent and KeypairListComponent

This commit is contained in:
Cristhian Zanforlin Lousa 2023-09-14 19:57:33 -03:00
commit 83e48f0728

View file

@ -375,11 +375,10 @@ export default function ParameterComponent({
<DictComponent
disabled={disabled}
editNode={false}
value={obj}
value={data.node!.template[name].value ?? obj}
onChange={(newValue) => {
setObj(newValue);
data.node!.template[name].value = newValue;
console.log(data);
}}
/>
</div>
@ -388,7 +387,7 @@ export default function ParameterComponent({
<KeypairListComponent
disabled={disabled}
editNode={false}
value={dictArr}
value={data.node!.template[name].value ?? dict}
duplicateKey={errorDuplicateKey}
onChange={(newValue: string[]) => {
setErrorDuplicateKey(hasDuplicateKeys(newValue));