mirror of
http://112.124.100.131/huang.ze/ebiz-dify-ai.git
synced 2025-12-10 19:36:53 +08:00
This commit is contained in:
@@ -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 })
|
||||||
|
|||||||
Reference in New Issue
Block a user