method
TextListField.Default
Set the initial list.
Example
field.TextList("tags").Default("new", "sale")Arguments
| Argument | Type | Description |
|---|---|---|
values | []string | Initial items, in order. With no arguments, the default is an empty list. |
Returns
The updated TextListField; the original field is unchanged.
TextListFieldHow it works
Items are copied and must satisfy item and count constraints. This replaces any DefaultFrom callback.
Defaults fill eligible omissions; explicit null and [] are not replaced.
Full signature
func (f TextListField) Default(values ...string) TextListFieldRelated types
TextListFieldA configurable list of strings.