CustomToolbarFormContext

Context provided to and to any Adaptable Buttons declared on a .

It extends with the current formData value, the form's overall validity (formIsValid) and any per-field validation errors (formErrors), so handlers can react to - or gate on - the current state of the controls rendered in the toolbar.

TypeScript
export interface CustomToolbarFormContext<TData extends AdaptableFormData = AdaptableFormData> extends
Extends

CustomToolbarButtonContext

Properties

PropertyTypeDescription
formDataTDataCurrent values of the form fields, keyed by field name. Strongly typed as TData when the hosting CustomToolbar supplies an explicit data shape.
formErrorsAdaptableFormErrorsPer-field validation errors keyed by field name. Empty when the form is valid.
formIsValidbooleantrue when every (non-hidden) field's value satisfies its validation rules (required, min, max, pattern, custom validate).
adaptableContextanyCustom application Context provided in AdaptableOptions.adaptableContext

Property Details

formData

Current values of the form fields, keyed by field name. Strongly typed as TData when the hosting CustomToolbar supplies an explicit data shape.

TypeScript
formData: TData;
Property Value

TData

formErrors

Per-field validation errors keyed by field name. Empty when the form is valid.

TypeScript
formErrors: AdaptableFormErrors;
Property Value

AdaptableFormErrors

formIsValid

true when every (non-hidden) field's value satisfies its validation rules (required, min, max, pattern, custom validate).

TypeScript
formIsValid: boolean;
Property Value

boolean

adaptableContext

Inherited from BaseContext

Custom application Context provided in AdaptableOptions.adaptableContext

TypeScript
adaptableContext: any;
Property Value

any