method
NumberListField.Default
Set the initial list.
Example
field.NumberList("availableSizes").Default(8, 10, 12)Arguments
| Argument | Type | Description |
|---|---|---|
values | []float64 | Initial items, in order. With no arguments, the default is an empty list. |
Returns
The updated NumberListField; the original field is unchanged.
NumberListFieldHow 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 NumberListField) Default(values ...float64) NumberListFieldRelated types
NumberListFieldA configurable list of numbers.