Interface: FormContext<M>
Context passed to custom fields
Type parameters​
Name | Type |
---|---|
M | extends Record <string , any > = any |
Properties​
collection​
• collection: ResolvedEntityCollection
<M
>
Collection of the entity being modified
Defined in​
packages/firecms/src/types/fields.tsx:129
entityId​
• Optional
entityId: string
Entity id, it can be null if it's a new entity
Defined in​
packages/firecms/src/types/fields.tsx:139
path​
• path: string
Path this entity is located at
Defined in​
packages/firecms/src/types/fields.tsx:144
save​
• save: (values
: M
) => void
Type declaration​
â–¸ (values
): void
Save the entity
Parameters​
Name | Type |
---|---|
values | M |
Returns​
void
Defined in​
packages/firecms/src/types/fields.tsx:157
setFieldValue​
• setFieldValue: (key
: string
, value
: any
, shouldValidate?
: boolean
) => void
Type declaration​
â–¸ (key
, value
, shouldValidate?
): void
Update the value of a field
Parameters​
Name | Type |
---|---|
key | string |
value | any |
shouldValidate? | boolean |
Returns​
void
Defined in​
packages/firecms/src/types/fields.tsx:152
values​
• values: M
Current values of the entity