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