Interface: Fielder\<T, FieldName>
Defined in: forms/types/Fielder.ts:9
Type Parameters
T
T
FieldName
FieldName extends keyof T
Properties
attr
attr: \<
AttrName>(attrName) =>FieldSet\<T>[FieldName][AttrName]
Defined in: forms/types/Fielder.ts:19
Grabs a specified attribute from a field's settings, such as its 'value' or its 'validators' array.
Type Parameters
AttrName
AttrName extends string
Parameters
attrName
AttrName
Returns
FieldSet\<T>[FieldName][AttrName]
cancelValidation
cancelValidation: () =>
void
Defined in: forms/types/Fielder.ts:65
Force cancel current validation run. We use this when submitting a form so our validators don't clobber whatever the server sends back.
Returns
void
controller
controller:
FormController\<T>
Defined in: forms/types/Fielder.ts:73
Returns the FormController.
debounce
debounce:
FieldSet\<T>[FieldName]["debounce"]
Defined in: forms/types/Fielder.ts:51
Returns the debounce rate set on the field.
disabled
disabled:
boolean
Defined in: forms/types/Fielder.ts:35
Returns a flag which indicates if the field should be considered disabled.
errors
errors:
FieldSet\<T>[FieldName]["errors"]
Defined in: forms/types/Fielder.ts:39
Gets/sets the errors on a field.
fieldName
fieldName:
FieldName
Defined in: forms/types/Fielder.ts:27
Returns the name of the field
initialValue
initialValue:
T[FieldName]
Defined in: forms/types/Fielder.ts:47
Gets/sets the initial Value for this field. This is what is used to populate the field when the form is reset.
model
model:
T[FieldName]
Defined in: forms/types/Fielder.ts:31
Gets/sets the raw value of the field, triggering validation checks.
moduleType
moduleType:
"fielder"
Defined in: forms/types/Fielder.ts:15
Returns 'fielder', the type of 'module' this wrapper handles. Technically fielders aren't modules,
since their state is shared with singles, however this makes it consistent with similarly behaving controllers,
which should have a moduleType property for easy identification.
rawValue
rawValue:
T[FieldName]
Defined in: forms/types/Fielder.ts:23
Gets/sets the raw value of the field. Unlike model, this does not trigger validation checks.
reset
reset: () =>
void
Defined in: forms/types/Fielder.ts:69
Resets this field to its initial value and clears errors.
Returns
void
runValidators
runValidators: () =>
void
Defined in: forms/types/Fielder.ts:56
Runs the validators on the form. Usually you don't want to call this directly-- instead, try the debounced validate() function.
Returns
void
step
step:
FieldSet\<T>[FieldName]["step"]
Defined in: forms/types/Fielder.ts:43
Gets/sets the form step this field is on.
validate
validate:
DebouncedFunc\<(...args) =>any>
Defined in: forms/types/Fielder.ts:60
Debounced call to runValidators. Especially helpful to avoid annoying users that are still typing.