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] batch 对 observe 无效,会触发多次回调 #3405

Closed chhpt closed 2 years ago

chhpt commented 2 years ago

Reproduction link

Edit on CodeSandbox

Steps to reproduce

点击测试按钮

What is expected?

输出一次 DataChange

What is actually happening?

输出了两次 DataChange

Package

@formily/reactive@2.2.4


janryWang commented 2 years ago

合理的,batch是只对依赖收集的响应器生效,但是observe是任何一次操作都会收集到

chhpt commented 2 years ago

请问有没有可能支持对 observe 生效的 batch 操作呢