react-component / form

React High Order Form Component(web & react-native)
http://react-component.github.io/form/
MIT License
1.81k stars 296 forks source link

Clean field if not render #204

Closed zombieJ closed 6 years ago

zombieJ commented 6 years ago
zombieJ commented 6 years ago

eslint 更新了一下,只要看主要代码 cleanUpUselessFields 就行了:https://github.com/react-component/form/pull/204/files#diff-8da14541e874cd999278a6e5f73ee163R339

afc163 commented 6 years ago

看描述有点担心把 https://github.com/react-component/form/blob/master/tests/dynamic-binding.spec.jshttp://react-component.github.io/form/examples/dynamic-fields.html 搞挂了,不过用例过了应该没啥问题。

TotooriaHyperion commented 6 years ago

这个PR导致了在进行某些性能优化的情况下,fields被清空的问题。

205

本来form对象每次生成新对象的【隐式触发渲染】就是一个让人头疼的机制了,现在又搞【隐式晴空fields】就很尴尬了。。。渲染流程应该又显式的配置/规则/钩子支持。而不是一味在代码里添加某些带来不确定性的隐式功能。。。

TotooriaHyperion commented 6 years ago

@zombieJ @afc163 bug重现: https://github.com/TotooriaHyperion/rc-form-bug

bug修复:

206