Fable.Modulo


FormSelectModel<'f, 't> Type

Model for a "select"-like element

Record fields

Record Field Description

AddEmptySelection

Full Usage: AddEmptySelection

Field type: bool

Adds an empty element if true

Field type: bool

EmptyErrorMessage

Full Usage: EmptyErrorMessage

Field type: string

The error to display when no selection has been made

Field type: string

KeyFunction

Full Usage: KeyFunction

Field type: 't -> string

A function that generates an unique string for each value

Field type: 't -> string

Layout

Full Usage: Layout

Field type: FormFieldLayout

Layout options

Field type: FormFieldLayout

Updater

Full Usage: Updater

Field type: FormSelectModel<'f, 't> -> 'f -> 'f

A function used to serialize the value to a string that is stored in the underlying "select"/"option"

Field type: FormSelectModel<'f, 't> -> 'f -> 'f

Validator

Full Usage: Validator

Field type: ('f -> 't -> Result<'t, string>) option

Validate the field's value, possibly against the whole form

Field type: ('f -> 't -> Result<'t, string>) option

Value

Full Usage: Value

Field type: Result<'t, string>

The current item's value

Field type: Result<'t, string>

ValueLabel

Full Usage: ValueLabel

Field type: 't -> string

A function to get the user-facing string representation of a value

Field type: 't -> string

Values

Full Usage: Values

Field type: 't[]

The available values

Field type: 't[]

Instance members

Instance member Description

this.UpdateForm

Full Usage: this.UpdateForm

Parameters:
    form : 'f

Returns: 'f

Update the parent form with this item's value

form : 'f
Returns: 'f

this.Validate

Full Usage: this.Validate

Parameters:
    form : 'f
    value : Result<'t, string>

Returns: Result<'t, string>

Validate the given value against the given form using this field's validator if defined

form : 'f
value : Result<'t, string>
Returns: Result<'t, string>