feat: support var remove in code node

This commit is contained in:
Joel
2024-03-22 15:20:09 +08:00
parent 340ae3c52f
commit 5843b30a13
3 changed files with 45 additions and 4 deletions

View File

@ -85,7 +85,14 @@ const useConfig = (id: string, payload: CodeNodeType) => {
setInputs(newInputs)
}, [allLanguageDefault, inputs, setInputs])
const { handleVarsChange, handleAddVariable: handleAddOutputVariable, handleRemoveVariable } = useOutputVarList<CodeNodeType>({
const {
handleVarsChange,
handleAddVariable: handleAddOutputVariable,
handleRemoveVariable,
isShowRemoveVarConfirm,
hideRemoveVarConfirm,
onRemoveVarConfirm,
} = useOutputVarList<CodeNodeType>({
id,
inputs,
setInputs,
@ -142,6 +149,9 @@ const useConfig = (id: string, payload: CodeNodeType) => {
handleVarsChange,
filterVar,
handleAddOutputVariable,
isShowRemoveVarConfirm,
hideRemoveVarConfirm,
onRemoveVarConfirm,
// single run
isShowSingleRun,
hideSingleRun,