mirror of
https://git.mirrors.martin98.com/https://github.com/langgenius/dify.git
synced 2025-06-30 12:45:11 +08:00
This commit is contained in:
parent
f7959bc887
commit
ab2e6c19a4
@ -61,7 +61,8 @@ const Form: FC<FormProps> = ({
|
|||||||
const shouldClearVariable: Record<string, string | undefined> = {}
|
const shouldClearVariable: Record<string, string | undefined> = {}
|
||||||
if (showOnVariableMap[key]?.length) {
|
if (showOnVariableMap[key]?.length) {
|
||||||
showOnVariableMap[key].forEach((clearVariable) => {
|
showOnVariableMap[key].forEach((clearVariable) => {
|
||||||
shouldClearVariable[clearVariable] = undefined
|
const schema = formSchemas.find(it => it.variable === clearVariable)
|
||||||
|
shouldClearVariable[clearVariable] = schema ? schema.default : undefined
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
onChange({ ...value, [key]: val, ...shouldClearVariable })
|
onChange({ ...value, [key]: val, ...shouldClearVariable })
|
||||||
|
Loading…
x
Reference in New Issue
Block a user