ant-design / ant-design/pro-components
多层list嵌套中的日期组件,getFieldsFormatValue未对其生效🐛[BUG]
- Dominant language
- TypeScript
- Stars
- 4.8k
- Forks
- 1.4k
- Avg merge
- 10h 44m
- Merged PRs (30d)
- 3
Description
### 🐛 bug 描述
多层list嵌套,在深层嵌套的list中使用日期组件设置了format,但使用getFieldsFormatValue返回的数据并未格式化
### 💻 复现代码
```tsx
import { ProFormInstance, ProFormItem, ProFormTimePicker } from '@ant-design/pro-components';
import { ProForm, ProFormList } from '@ant-design/pro-components';
import { useRef } from 'react';
export default () => {
const formRef = useRef<
ProFormInstance<{
name: string;
company?: string;
useMode?: string;
}>
>();
return (
formRef={formRef}
formKey="base-form-use-demo"
autoFocusFirstInput
>
{() => {
return (
);
}}
{() => {
return (
getFieldsFormatValue格式化:
{JSON.stringify(formRef.current?.getFieldsFormatValue?.())}
);
}}
{() => {
return (
);
}}
);
};
```
### 🏞 期望结果

### © 版本信息
- ProComponents 版本: 最新版本
Contributor guide
Research direction
Start by running the nested ProFormList reproduction and inspect the getFieldsFormatValue entry point used by ProFormInstance. Trace how the nested ProFormTimePicker format is handled, then verify that the returned value is formatted at the deepest list level without changing getFieldsValue behavior.
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