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

🐛[BUG] 在 ProFormList 中使用 ProFormDependency 监听 ProFormDigit 的值异常

Open ryanxc1107 opened this issue 1 year ago • 1 comments

🐛 bug 描述

在 ProFormList 中使用了 ProFormDependency 监听 ProFormDigit 的值做一些动态 UI,在 ProFormDigit 的值为整数 0 时,ProFormDependency 监听到的值为 undefined,其他数值一切正常,包括负数。在非 ProFormList 包裹的 Form 场景使用时,上述的组件搭配使用一切正常。

📷 复现步骤

使用以下代码片段,问题必现:

image

🏞 期望结果

在 ProFormList 组件内 ProFormDependency 对 ProFormDigit 的值监听正常

💻 复现代码

Stackblitz demo

© 版本信息

  • ProComponents 版本: 2.6.44
  • antd: 5.12.8
  • 浏览器环境: Chrome 120.x
  • 开发环境: Windows 11

ryanxc1107 avatar Jan 12 '24 07:01 ryanxc1107

遇到同样的问题 给个默认值 临时解决下 {({ number = 0 }) => {

SamLihang avatar Jun 14 '24 09:06 SamLihang