🐛 fix(parameterComponent): remove unnecessary useEffect hook that sets dictArr state
🐛 fix(parameterComponent): update value prop of KeypairListComponent to use convertObjToArray(dict) instead of dict
This commit is contained in:
parent
83e48f0728
commit
dd556c518d
1 changed files with 1 additions and 5 deletions
|
|
@ -118,10 +118,6 @@ export default function ParameterComponent({
|
|||
} as {});
|
||||
const [dictArr, setDictArr] = useState([] as string[]);
|
||||
|
||||
useEffect(() => {
|
||||
setDictArr(convertObjToArray(dict));
|
||||
}, [dict]);
|
||||
|
||||
useEffect(() => {
|
||||
if (name === "openai_api_base") console.log(info);
|
||||
// @ts-ignore
|
||||
|
|
@ -387,7 +383,7 @@ export default function ParameterComponent({
|
|||
<KeypairListComponent
|
||||
disabled={disabled}
|
||||
editNode={false}
|
||||
value={data.node!.template[name].value ?? dict}
|
||||
value={data.node!.template[name].value ?? convertObjToArray(dict)}
|
||||
duplicateKey={errorDuplicateKey}
|
||||
onChange={(newValue: string[]) => {
|
||||
setErrorDuplicateKey(hasDuplicateKeys(newValue));
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue