ant-design / ant-design/pro-components
🐛[BUG] 在 ProFormList 中使用 ProFormDependency 监听 ProFormDigit 的值异常
- Dominant language
- TypeScript
- Stars
- 4.8k
- Forks
- 1.4k
- Avg merge
- 10h 44m
- Merged PRs (30d)
- 3
Description
### 🐛 bug 描述
在 ProFormList 中使用了 ProFormDependency 监听 ProFormDigit 的值做一些动态 UI,**_在 ProFormDigit 的值为整数 0 时,ProFormDependency 监听到的值为 undefined_**,其他数值一切正常,包括负数。在非 ProFormList 包裹的 Form 场景使用时,上述的组件搭配使用一切正常。
### 📷 复现步骤
使用以下代码片段,问题必现:

### 🏞 期望结果
在 ProFormList 组件内 ProFormDependency 对 ProFormDigit 的值监听正常
### 💻 复现代码
[Stackblitz demo](https://stackblitz.com/edit/react-o6t8as?file=App.tsx,package.json)
### © 版本信息
- ProComponents 版本: 2.6.44
- antd: 5.12.8
- 浏览器环境: Chrome 120.x
- 开发环境: Windows 11
Contributor guide
Research direction
Start with the linked StackBlitz reproduction, especially App.tsx and package.json, and confirm the behavior with ProFormList, ProFormDependency, and ProFormDigit. Trace how the dependency receives the digit value when it is integer 0, then verify that the reproduction reports 0 rather than undefined while other values remain correct.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- react, typescript
- Domain
- frontend
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 42/100