Skip to content

🐛[BUG] ProFormList嵌套ProFormList无法正确删除 #6848

Open
@zd5043039119

Description

@zd5043039119

提问前先看看:

https://github.com/ryanhanwu/How-To-Ask-Questions-The-Smart-Way/blob/main/README-zh_CN.md

🐛 bug 描述

当ProFormList嵌套ProFormList,且有initialValues,且ProForm配置了preserve为false时,删除到最后一个元素后会生成一个空对象

📷 复现步骤

  1. 访问复现代码链接, 点击删除
  2. 点击第二行的删除后无法正确删除

🏞 期望结果

能正常删除所有数据

💻 复现代码

https://codesandbox.io/s/proform-list-proformlist-forked-bok1c2?file=/App.tsx

© 版本信息

  • ProComponents 版本: 2.4.2
  • 浏览器环境 chrome

🚑 其他信息

  1. 非嵌套结构一切正常
  2. initialValue中 没有嵌套的空数组也正常
  3. 使用Antd Form还原相同场景无法重现 (附Antd Form的代码 https://codesandbox.io/s/fu-za-de-dong-tai-zeng-jian-biao-dan-xiang-antd-5-3-2-forked-vc7et4?file=/demo.tsx)

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions