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: 修复ArrayTable筛选后, index找寻逻辑错误导致过滤后的数据状态异常 #41

Merged
merged 1 commit into from
Jun 4, 2024

Conversation

over58
Copy link
Contributor

@over58 over58 commented May 23, 2024

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

  • If you've added code that should be tested, add tests!
  • Fork the repo and create your branch from master or master.
  • Ensure the pull request title and commit message follow the Commit Specific in English.
  • If you've changed APIs, update the documentation.
  • Ensure the test suite passes (npm test).
  • Make sure your code lints (npm run lint) - we've done our best to make sure these rules match our internal linting guidelines.

Please do not delete the above content


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

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

alibaba/formily#4146

What have you changed?

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

Copy link

netlify bot commented May 23, 2024

Deploy Preview for formily-antd5 ready!

Name Link
🔨 Latest commit 0524624
🔍 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.

@yiyunwan yiyunwan merged commit e8ed05f into formilyjs:master Jun 4, 2024
15 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants