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

[Bug Report] antd-v5 ArrayTable 条目拖曳至表格外后索引为NaN #3971

Closed
1 task done
tmsi10 opened this issue Sep 14, 2023 · 1 comment
Closed
1 task done

Comments

@tmsi10
Copy link

tmsi10 commented Sep 14, 2023

  • 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. 使用文档的Markup Schema 案例
  2. 新增条目
  3. 提交表格
  4. 校验器提示a2 a3为必填
  5. 把条目拖曳至表格外才松开
  6. 校验器提示消失
  7. 填写a2 a3
  8. 再次提交表格

What is expected?

  1. 拖曳后保留校验器提示
  2. 填写后能够成功提交表格

What is actually happening?

从console看见校验错误且条目索引为NaN

Package

@formily/[email protected]


  1. Dnd kit 里 onDragEndDragEndEvent.over 在拖曳至容器外时为null
  2. SortableContainerover?.id 减1 变成 NaN
  3. ArrayTable 里的组件在 onDragEnd 调用 ArrayField.move(oldIndex, newIndex /* NaN */);
@tmsi10 tmsi10 changed the title [Bug Report] ArrayTable 条目拖曳至表格外后索引为NaN [Bug Report] antd-v5 ArrayTable 条目拖曳至表格外后索引为NaN Sep 14, 2023
@yiyunwan
Copy link
Collaborator

已修复 formilyjs/antd#26

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

No branches or pull requests

2 participants