alibaba / formily

📱🚀 🧩 Cross Device & High Performance Normal Form/Dynamic(JSON Schema) Form/Form Builder -- Support React/React Native/Vue 2/Vue 3
https://formilyjs.org/
MIT License
11.48k stars 1.49k forks source link

[Bug Report] 带初始值的ArrayTable嵌套于ArrayCards中使用时,在ArrayTable新建一行,已有的行也会触发reactions #4037

Closed sTeADone closed 11 months ago

sTeADone commented 11 months ago

Reproduction link

Edit on CodeSandbox

Steps to reproduce

两个ArrayTable,初始第一行A3随便输入点什么 分别新建一行

What is expected?

第一行不变

What is actually happening?

ArrayCards内的ArrayTable第一行会触发联动清空A3 ArrayCards外的ArrayTable第一行不会触发联动

Package

@formily/antd-v5@2.3.0


只在第一次新建行时出现 再次新建不会出现

janryWang commented 11 months ago

codesandbox 挂了

sTeADone commented 11 months ago

我把antd降回5.11.5 codesandbox 可以跑了

janryWang commented 11 months ago

对于这种清空场景需要改成主动联动,被动联动是会出现这种问题的,因为被动联动会一直触发,主动联动的方式可以直接配一个 onChange 事件来清空,也可以写 effects