Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(@uform/core/react): fix #613 #615 #618

Merged
merged 5 commits into from
Jan 19, 2020

Conversation

janryWang
Copy link
Collaborator

Fix #613
这个问题,想了很多方案,最终都没有找到可以让用户不改代码就能解决的方案,之前给的临时方案是给children设置一个空数组,但是这样很容易遗漏,并不是可行方案,所以,只能考虑给Field维度新增一个dataType的概念,默认是any,指定array的话,它会在数组项被销毁之后,节点自动销毁
Fix #615
这个问题,是踩了React的坑,useRef在组件unmount之后引用会被自动销毁,diff信息对比就会失效,所以需要将diff信息存在field维度中,其实这也合理

@missop
Copy link

missop commented Jan 19, 2020

还有个问题就是数组项上下移动之后为什么会被销毁

@janryWang
Copy link
Collaborator Author

还有个问题就是数组项上下移动之后为什么会被销毁

销毁的不是父List,是子List,比如第一个父List的子List为空,第二个父List的子List不为空,在第二个移动到第一个的过程中,第二个变成第一个,相当于需要删除第二个List的子List

@janryWang janryWang merged commit 8dc609f into alibaba:master Jan 19, 2020
@janryWang janryWang deleted the fix_isValid branch January 19, 2020 05:28
@missop
Copy link

missop commented Jan 21, 2020

那么如何实现不删除子list的移动呢,或者说怎么实现类似于这样的级联表单

ZirkleTsing pushed a commit that referenced this pull request May 14, 2020
* fix(@uform/shared): fix isValid

* fix(@uform/core): fix visible changed but not trigger onChange callback

* fix(@uform/core): fix #613 and #615

* refactor(@uform/core): improve code
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants