Type Alias: FieldConfig<Value>
FieldConfig<
Value> =object
Defined in: lib/forms/fields.ts:48
Type definition for a field configuration.
Type Parameters
Value
Value
Properties
decrementDisabled()?
optionaldecrementDisabled: () =>boolean
Defined in: lib/forms/fields.ts:56
Custom hook to disable a control decreasing the field's value.
Returns
boolean
disabled()?
optionaldisabled: () =>boolean
Defined in: lib/forms/fields.ts:51
Custom hook to provide a dynamic value for the disabled tag.
Returns
boolean
effects?
optionaleffects: () =>void[]
Defined in: lib/forms/fields.ts:52
Array of useEffect functions to apply.
Returns
void
fieldAtom
fieldAtom:
FieldAtom<Value>
Defined in: lib/forms/fields.ts:49
The embedded field to enrich with additional functionality.
incrementDisabled()?
optionalincrementDisabled: () =>boolean
Defined in: lib/forms/fields.ts:57
Custom hook to disable a control increasing the field's value.
Returns
boolean
mandatory?
optionalmandatory:boolean| () =>boolean
Defined in: lib/forms/fields.ts:61
Indicates if a non-empty value is expected.
max?
optionalmax:number
Defined in: lib/forms/fields.ts:54
A maximum value for a numeric field; a maximum length for a string field.
min?
optionalmin:number
Defined in: lib/forms/fields.ts:53
A minimum value for a numeric field; a minimum length for a string field.
options?
optionaloptions:FieldConfigOption[]
Defined in: lib/forms/fields.ts:58
Options for a select field.
optionsInfos?
optionaloptionsInfos:Map<number,FieldConfigOptionInfos>
Defined in: lib/forms/fields.ts:60
Configuring additional behaviours on options passed to a select field.
optionsOnly?
optionaloptionsOnly:number[]
Defined in: lib/forms/fields.ts:59
Amongst the given options, which values to allow.
step?
optionalstep:number
Defined in: lib/forms/fields.ts:55
A step value for a numeric field.
valid()?
optionalvalid: () =>null|FieldValueError
Defined in: lib/forms/fields.ts:62
Custom hook to provide a way to tell if the field's value is valid.
Returns
null | FieldValueError
visible()?
optionalvisible: () =>boolean
Defined in: lib/forms/fields.ts:50
Custom hook to condition the rendering of the field.
Returns
boolean