ant-design / ant-design/pro-components
🐛[BUG] ProForm.Item组件中使用Input,无法通过form.getFieldValue("name")获取value值,显示undefined
- Dominant language
- TypeScript
- Stars
- 4.8k
- Forks
- 1.4k
- Avg merge
- 10h 44m
- Merged PRs (30d)
- 3
Description
提问前先看看:
https://github.com/ryanhanwu/How-To-Ask-Questions-The-Smart-Way/blob/main/README-zh_CN.md
### 🐛 bug 描述
``组件中使用``,无法通过`form.getFieldValue("name")`获取value值。但是使用``组件就能正常获取数值
### 📷 复现步骤
```
//1.获取from表单
const [form] = Form.useForm()
//2.获取name="AAA"的值
form.getFieldValue('AAA')
```
### 🏞 期望结果
希望form.getFieldValue('AAA')能够获取到用户输入的正常数值。
### 💻 复现代码
### © 版本信息
- ProComponents 版本: [e.g. 4.0.0]
- umi 版本
- 浏览器环境
- 开发环境 [e.g. mac OS]
### 🚑 其他信息
Contributor guide
Research direction
Start with the provided ProForm.Item reproduction using Input and form.getFieldValue('AAA'); inspect the ProForm form-field integration and compare it with ProFormText. Done means user input is returned by form.getFieldValue for the named field and the reproduction is covered by a regression test.
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
- 35/100