react-component / field-form

⚡️ React Performance First Form Component
https://field-form.react-component.now.sh/
MIT License
975 stars 263 forks source link

StrictMode 下 preserve=fasle,使用动态节点时添加的值无法保存 #705

Open wanpan11 opened 3 months ago

wanpan11 commented 3 months ago

StrictMode 会导致 Field 组件卸载一次,这时 preserve=false 就会把 store 里的对应字段重置为 undefined,导致无法赋值。

image

image

wanpan11 commented 3 months ago

把首次创建的 value 缓存起来当 InitialValue 应该可以 @zombieJ 佬看看 有撒好的办法不

wanpan11 commented 3 months ago

加到 InitialValue 里,reset 会有问题🤧🤧

image