AdaptableFormFieldRenderParams

Parameters provided to when rendering a custom field type.

TypeScript
export interface

Properties

PropertyTypeDescription
contextBaseContextAdaptable context (carries adaptableApi, etc.). When the form is hosted by a Custom Toolbar this is in fact a CustomToolbarFormContext.
disabledbooleanResolved disabled state of the field (after evaluating field.disabled if it's a function).
errorstringCurrent validation error for this field, if any.
fieldAdaptableFormFieldThe field definition itself - useful when sharing one render function across several custom fields.
formDataAdaptableFormDataThe current values of all fields in the form, keyed by field name.
setValue(newValue: any) => voidSetter to update the field's value. Triggers form-level onChange, per-field onValueChange and re-validation.
valueanyThe field's current value

Property Details

context

Adaptable context (carries adaptableApi, etc.). When the form is hosted by a Custom Toolbar this is in fact a CustomToolbarFormContext.

TypeScript
context: BaseContext;
Property Value

BaseContext

disabled

Resolved disabled state of the field (after evaluating field.disabled if it's a function).

TypeScript
disabled: boolean;
Property Value

boolean

error

Current validation error for this field, if any.

TypeScript
error?: string;
Property Value

string

field

The field definition itself - useful when sharing one render function across several custom fields.

TypeScript
field: AdaptableFormField;
Property Value

AdaptableFormField

formData

The current values of all fields in the form, keyed by field name.

TypeScript
formData: AdaptableFormData;
Property Value

AdaptableFormData

setValue

Setter to update the field's value. Triggers form-level onChange, per-field onValueChange and re-validation.

TypeScript
setValue: (newValue: any) => void;
Property Value

(newValue: any) => void

value

The field's current value

TypeScript
value: any;
Property Value

any