ant-design / ant-design/pro-components
🐛[BUG]ProForm.useWatch无效
Open
- Dominant language
- TypeScript
- Stars
- 4.8k
- Forks
- 1.4k
- Avg merge
- 10h 44m
- Merged PRs (30d)
- 3
Description
### 🐛 bug 描述
无法监听,字段改变不会重新渲染
### 📷 复现步骤
使用ProForm.useWatch监听一个字段变化
### 💻 复现代码
` const region = ProForm.useWatch('region', { form: formRef?.current });
useEffect(() => {
console.log(region);
}, [region]);`
Contributor guide
Research direction
Start by reproducing the issue with the provided ProForm.useWatch snippet and inspect the ProForm.useWatch implementation and its form subscription behavior. Done means changing the watched field causes the component to re-render and the effect to log the updated value.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- react, typescript
- Domain
- frontend
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100