Skip to content

Support for multiple fields in form-list widget #14

@taras80

Description

@taras80

Currently, in form-list widget only one field is supported. It would be nice if we could support multiple fields.

This example

fields: [
      {
        key: 'addresses',
        label: 'Addresses',
        widget: 'form-list',
        listItemMeta: {
          widget: 'select',
          options: ['Beijing', 'Shanghai', 'Nanjing'],
        },
      },
    ],

could look like

fields: [
      {
        key: 'addresses',
        label: 'Addresses',
        widget: 'form-list',
        listItemMeta: [{
          key: 'street', 
          label: 'Street',
        },
        {
          key: 'city',
          widget: 'select',
          options: ['Beijing', 'Shanghai', 'Nanjing'],
        }
      ],
    ],

Something like this
https://codesandbox.io/p/sandbox/antd-form-list-multiple-formitem-dynamic-fields-cje76

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions