ant-design / pro-components

🏆 Use Ant Design like a Pro!
https://pro-components.antdigital.dev
MIT License
4.3k stars 1.36k forks source link

🧐 Is it possible to use valueType: 'formList' in ProDescriptions component? #8630

Open SquirrelDeveloper opened 2 months ago

SquirrelDeveloper commented 2 months ago

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

<ProDescriptions<Template>
        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 }] },
              },
            ],
          },
        ]}
      />
SquirrelDeveloper commented 2 months ago
Screenshot 2024-08-05 at 17 01 05 Screenshot 2024-08-05 at 17 01 12