🐛 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 {});
|
} as {});
|
||||||
const [dictArr, setDictArr] = useState([] as string[]);
|
const [dictArr, setDictArr] = useState([] as string[]);
|
||||||
|
|
||||||
useEffect(() => {
|
|
||||||
setDictArr(convertObjToArray(dict));
|
|
||||||
}, [dict]);
|
|
||||||
|
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
if (name === "openai_api_base") console.log(info);
|
if (name === "openai_api_base") console.log(info);
|
||||||
// @ts-ignore
|
// @ts-ignore
|
||||||
|
|
@ -387,7 +383,7 @@ export default function ParameterComponent({
|
||||||
<KeypairListComponent
|
<KeypairListComponent
|
||||||
disabled={disabled}
|
disabled={disabled}
|
||||||
editNode={false}
|
editNode={false}
|
||||||
value={data.node!.template[name].value ?? dict}
|
value={data.node!.template[name].value ?? convertObjToArray(dict)}
|
||||||
duplicateKey={errorDuplicateKey}
|
duplicateKey={errorDuplicateKey}
|
||||||
onChange={(newValue: string[]) => {
|
onChange={(newValue: string[]) => {
|
||||||
setErrorDuplicateKey(hasDuplicateKeys(newValue));
|
setErrorDuplicateKey(hasDuplicateKeys(newValue));
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue