method

NumberListField.Default

Set the initial list.

Example

go
field.NumberList("availableSizes").Default(8, 10, 12)

Arguments

ArgumentTypeDescription
values[]float64Initial items, in order. With no arguments, the default is an empty list.

Returns

The updated NumberListField; the original field is unchanged.

NumberListField

How 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

Related types

Related guides