alibaba/formily

[Bug Report] 调用ArrayItems.Remove后$index没有更新

wy-luke opened this issue · 3 comments

  • I have searched the issues of this repository and believe that this is not a duplicate.

Reproduction link

Edit on CodeSandbox

Steps to reproduce

  1. 添加两个条目
  2. 点击两个编辑按钮,分别会打印出index为0和1
  3. 删除第一个元素,然后再点击编辑按钮,打印出来的还是1,而不是0,$index没有更新。但是$self.index是正确的。

What is expected?

$index随着真实index更新

What is actually happening?

$index只有初始化时进行赋值,没有再更新,闭包了吧

Package

@formily/antd-v5@2.3.1


P.S. 原有的CodeSandbox的模版都失效了,加载不出来