List

A list is a field that only accepts primitive fields as its value. The only fields that the List Field supports are the text, textarea, number, and select.

You can use this field when you want to have an array of items that return a single value.

List Field
{
  component: 'list',
  name: 'listName',
  label: 'List Field',
  description: 'A list field',
  field: {
    component: 'text'
  }, 
    itemProps?: {
    /** The label to be display on the list item. */
    label?: string;
  };

  validate: {
    maxItems?: number;
    required?: boolean;
  };

}

Key

Type

Required

Description

component

string

yes

The name of the field component. (list)

name

string

yes

The name of the field that will be accessible by the cms prop of the component.

label

string

no

A human-readable label for the field.

description

string

no

A short description of the setting scope.

field

Field

yes

The field that you want your list to return. (text, textarea, number, and select)

Last updated