Skip to main content

Interface: EntityFormProps<M>

Type parameters

Name
M

Properties

entity

Optional entity: Entity<M>

The updated entity is passed from the parent component when the underlying data has changed in the datasource

Defined in

form/EntityForm.tsx:88


path

path: string

Path of the collection this entity is located

Defined in

form/EntityForm.tsx:77


schemaOrResolver

schemaOrResolver: EntitySchema<M> & EntitySchemaResolver<M>

Use to resolve the schema properties for specific path, entity id or values

Defined in

form/EntityForm.tsx:82


status

status: EntityStatus

New or existing status

Defined in

form/EntityForm.tsx:72

Methods

onDiscard

Optional onDiscard(): void

The callback function called when discard is clicked

Returns

void

Defined in

form/EntityForm.tsx:107


onEntitySave

Optional onEntitySave(props): Promise<void>

The callback function called when Save is clicked and validation is correct

Parameters

NameType
propsObject
props.entityIdundefined | string
props.pathstring
props.previousValues?M
props.schemaEntitySchema<M>
props.valuesM

Returns

Promise<void>

Defined in

form/EntityForm.tsx:93


onModified

Optional onModified(dirty): void

The callback function when the form is dirty, so the values are different from the original ones

Parameters

NameType
dirtyboolean

Returns

void

Defined in

form/EntityForm.tsx:113


onValuesChanged

Optional onValuesChanged(values?): void

The callback function when the form original values have been modified

Parameters

NameType
values?M

Returns

void

Defined in

form/EntityForm.tsx:118