📱🚀 🧩 Cross Device & High Performance Normal Form/Dynamic(JSON Schema) Form/Form Builder -- Support React/React Native/Vue 2/Vue 3
10.94k
stars
1.43k
forks
source link
fix(core): initial value should clear in destroy #4053
Open
charlzyx opened 6 months ago
Before submitting a pull request, please make sure the following is done...
master
orformily_next
.npm test
).npm run lint
) - we've done our best to make sure these rules match our internal linting guidelines.Please do not delete the above content
What have you changed?
变更 destory 中 initialValues 处理逻辑
before: 子组件销毁调用的
patchFieldStates()
处理中,destory
默认不清理form.initialValues
, 在嵌套数组的情况下, 会出现一下问题 #4024 after: 在 destory 中判断, 如果 field 的 schema 存在不为 undefined 的initialValue
属性(即default
), 在销毁的时候进行删除, 以还原form.initialValues
讨论: