fix: in tool and http node of iteration can not show item var correctly (#4791)

This commit is contained in:
Joel
2024-05-30 10:40:27 +08:00
committed by GitHub
parent 3b60b712ec
commit 3175a2c76a
3 changed files with 7 additions and 7 deletions

View File

@@ -39,7 +39,7 @@ const ApiInput: FC<Props> = ({
const { t } = useTranslation()
const [isFocus, setIsFocus] = useState(false)
const { availableVars, availableNodes } = useAvailableVarList(nodeId, {
const { availableVars, availableNodesWithParent } = useAvailableVarList(nodeId, {
onlyLeafNodeVar: false,
filterVar: (varPayload: Var) => {
return [VarType.string, VarType.number].includes(varPayload.type)
@@ -70,7 +70,7 @@ const ApiInput: FC<Props> = ({
onChange={onUrlChange}
readOnly={readonly}
nodesOutputVars={availableVars}
availableNodes={availableNodes}
availableNodes={availableNodesWithParent}
onFocusChange={setIsFocus}
placeholder={!readonly ? t('workflow.nodes.http.apiPlaceholder')! : ''}
placeholderClassName='!leading-[21px]'