ant-design / ant-design/pro-components
🧐 Is it possible to use valueType: 'formList' in ProDescriptions component?
- Dominant language
- TypeScript
- Stars
- 4.8k
- Forks
- 1.4k
- Avg merge
- 10h 44m
- Merged PRs (30d)
- 3
Description
Hi,
I i have interrogation about the ProDescriptions component. Does it support a formlist as a column element?
My editor seems to say that I cannot specify the `columns` attribute in the columns configuration
```typescript
actionRef={actionRef}
column={2}
editable={{}}
formProps={{
onValuesChange: (e, f) => console.log(f),
}}
request={async () => {
return Promise.resolve({
success: true,
data: props.template,
});
}}
columns={[
{
title: 'Name',
key: 'title',
dataIndex: 'title',
ellipsis: true,
},
{
title: 'Restart Policy',
key: 'restart_policy',
dataIndex: 'restart_policy',
ellipsis: true,
},
{
title: 'Ports',
dataIndex: 'ports',
span: 2,
valueType: 'formList',
columns: [
{
dataIndex: 'container',
width: 'md',
formItemProps: { rules: [{ required: true }] },
},
],
},
]}
/>
```
Contributor guide
Research direction
Start at the ProDescriptions component and its columns and valueType configuration, then compare the formList example with the TypeScript definitions. Done means the supported configuration is established with a reproducible result, or the missing support is narrowed to a concrete implementation and test scope.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- react, typescript
- Domain
- frontend
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100