ant-design / ant-design/pro-components
Form 组件 onFinish 的 values 参数 和 form.getFieldsValue() 结果不一致
- Dominant language
- TypeScript
- Stars
- 4.8k
- Forks
- 1.4k
- Avg merge
- 10h 44m
- Merged PRs (30d)
- 3
Description
### Reproduction link
[](https://stackblitz.com/edit/mwfinsim?file=App.tsx)
https://codesandbox.io/p/sandbox/proform-date-bug-m6jjyp
### Steps to reproduce
1. fill in the form fields
2. submit
3. check the data log inside the console: the `contractTime` is not available in the Form.onFinish.values
### What is expected?
`values.contractTime` supposed to be Date[], same as the `form.getFieldsValue().contractTime` result.
### What is actually happening?
`values.contractTime` is empty object array.
`form.getFieldsValue().contractTime` is Date array.
| Environment | Info |
| --- | --- |
| antd | 5.24.3 |
| React | 19.0.0 |
| System | macos |
| Browser | chrome |
Contributor guide
Research direction
Start with the linked StackBlitz or CodeSandbox reproduction and inspect the Form.onFinish values alongside form.getFieldsValue() for contractTime. Confirm the behavior with the listed Ant Design, React, and Chrome versions; done means values.contractTime is a Date[] matching the form.getFieldsValue().contractTime result.
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
- 45/100