Module
Formless.Class.Initial
- Package
- purescript-halogen-formless
- Repository
- thomashoneyman/purescript-halogen-formless
#Initial Source
class Initial v where
A type class that provides initial values for form fields. While superficially similar to
Haskell's Default
type class, this class is only meant for the purposes of defining
initial form values. If you need a default value for a field in your form, you are better
off defining it as a Maybe
field and providing a default as part of validation.
In general, if you find yourself reaching for this type class without defining your form as a row and generating your form spec from it, then you are probably not doing what you intend.
Members
initial :: v
Instances
Initial Unit
Initial Boolean
Initial Int
Initial Number
Initial String
Initial Ordering
Initial (Maybe a)
Initial (Array a)
Initial (List a)
(Ord k) => Initial (Map k v)
(Ord a) => Initial (Set a)
(Monoid b) => Initial (a -> b)
(Initial a, Initial b) => Initial (Tuple a b)
(RowToList row list, MonoidRecord list row row) => Initial (Record row)
- Modules
- Formless
- Formless.
Action - Formless.
Class. Initial - Formless.
Component - Formless.
Data. FormFieldResult - Formless.
Internal. Component - Formless.
Internal. Debounce - Formless.
Internal. Transform - Formless.
Query - Formless.
Retrieve - Formless.
Transform. Record - Formless.
Transform. Row - Formless.
Types. Component - Formless.
Types. Form - Formless.
Validation