Skip to main content
Module

x/netlify_cms_config/mod.ts>List

Netlify CMS config generator
Latest
class List
extends Field<Options>
Re-export
import { List } from "https://deno.land/x/netlify_cms_config@v0.3.2/mod.ts";

Constructors

new
List(label: string, config?: Options)

Properties

widget: string

Methods

addToTop(value?): this

When true, new entries will be added to the top of the list

allowAdd(value?): this

False hides the button to add additional items

collapsed(value?): this

When true, the entries collapse by default

default(value: string[] | Record<string, unknown>[]): this

You may specify a list of strings to populate the basic text field, or an array of list items for lists using the fields option. If no default is declared when using field or fields, will default to a single list item using the defaults on the child widgets

fields(value: Field | Field[]): this

A single widget field to be repeated

labelSingular(value: string): this

The text to show on the add button

max(value: number): this

Maximum number of items in the list

min(value: number): this

Minimum number of items in the list

minimizeCollapsed(value?): this

When true, collapsing the list widget will hide all of it's entries instead of showing summaries

summary(value: string): this

Specify the label displayed on collapsed entries

toJSON(): Record<string, unknown>

Return the field as JSON

Static Properties

defaults: Options