formilyjs / antd

Formily Ant Design Adaptor
MIT License
51 stars 45 forks source link

fix: 修复ArrayTable筛选后, index找寻逻辑错误导致过滤后的数据状态异常 #41

Closed over58 closed 3 months ago

over58 commented 4 months ago

Before submitting a pull request, please make sure the following is done...

Please do not delete the above content


问题:ArrayTable中判断行索引index的逻辑异常,导致筛选后的行数据,状态异常 。 原本使用的

render(value,record) {
   // dataSource是一个代理对象数组
   // record 不是原数据的引用了,就是个普通对象, index始终为-1
   const index = dataSource.indexOf(record);
}

https://github.com/alibaba/formily/issues/4146

What have you changed?

对dataSource 中添加了一个index属性来保存行索引。 查看中文下的deploy preview image

netlify[bot] commented 4 months ago

Deploy Preview for formily-antd5 ready!

Name Link
Latest commit 05246240d74422c344899e6a37fc4eba336997b9
Latest deploy log https://app.netlify.com/sites/formily-antd5/deploys/664ee0ec510db4000840803f
Deploy Preview https://deploy-preview-41--formily-antd5.netlify.app
Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.