Interface: FormContext<M>
Context passed to custom fields
Type Parameters​
• M extends Record
<string
, any
> = any
Properties​
collection?​
optional
collection:ResolvedEntityCollection
<M
>
Collection of the entity being modified
Defined in​
packages/firecms_core/src/types/fields.tsx:151
entityId​
entityId:
string
Entity id, it can be null if it's a new entity
Defined in​
packages/firecms_core/src/types/fields.tsx:156
formex​
formex:
FormexController
<M
>
This is the underlying formex controller that powers the form
Defined in​
packages/firecms_core/src/types/fields.tsx:166
path?​
optional
path:string
Path this entity is located at
Defined in​
packages/firecms_core/src/types/fields.tsx:161
save()​
save: (
values
) =>void
Save the entity.
Parameters​
• values: M
Returns​
void
Defined in​
packages/firecms_core/src/types/fields.tsx:146
setFieldValue()​
setFieldValue: (
key
,value
,shouldValidate
?) =>void
Update the value of a field
Parameters​
• key: string
• value: any
• shouldValidate?: boolean
Returns​
void
Defined in​
packages/firecms_core/src/types/fields.tsx:141
values​
values:
M
Current values of the entity