fix: number variable can not input constant type value in tool config form (#11320)

This commit is contained in:
Joel 2024-12-04 10:46:03 +08:00 committed by GitHub
parent 1cb5a12abb
commit e240424be5
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -173,7 +173,8 @@ const InputVarList: FC<Props> = ({
value={varInput?.type === VarKindType.constant ? (varInput?.value || '') : (varInput?.value || [])}
onChange={handleNotMixedTypeChange(variable)}
onOpen={handleOpen(index)}
defaultVarKindType={VarKindType.variable}
defaultVarKindType={isNumber ? VarKindType.constant : VarKindType.variable}
isSupportConstantValue={isSupportConstantValue}
filterVar={isNumber ? filterVar : undefined}
availableVars={isSelect ? availableVars : undefined}
schema={schema}