pro-components icon indicating copy to clipboard operation
pro-components copied to clipboard

🐛[BUG]ProFormList嵌套为二维数组时,子List调用setCurrentRowData修改数据的NamePath不正确

Open soradaisuke opened this issue 2 years ago • 1 comments

🐛 bug 描述

<ProFormList name="list">
  <ProFormList name={[]}>
    {
      (_, __, action) => {
      }
    }
  </ProFormList>
</ProFormList>

比如按照这种方式嵌套,action.getCurrentRowData()获取结果是正确的,但是action.setCurrentRowData()并没有把数据设置到正确的NamePath上

https://github.com/ant-design/pro-components/commit/47fe90c1d90ef6b8e28bdbdda86a915454cb1d64

跟这个fix是同样的问题,filter(Boolean)会把NamePath里的数值0过滤掉,其他的地方的filter(Boolean)都被替换了,只有setCurrentRowData里没有改

📷 复现步骤

如上

🏞 期望结果

💻 复现代码

© 版本信息

  • ProForm:1.70.0

🚑 其他信息

soradaisuke avatar Jul 22 '22 08:07 soradaisuke

+1

wmy94827 avatar Aug 13 '22 09:08 wmy94827