Skip to main content

Interface: EntityFormProps<M>

Type parameters#

NameType
MM: Object

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:86


path#

path: string

Path of the collection this entity is located

Defined in#

form/EntityForm.tsx:75


schema#

schema: EntitySchema<M>

Schema of the entity this form represents

Defined in#

form/EntityForm.tsx:80


status#

status: EntityStatus

New or existing status

Defined in#

form/EntityForm.tsx:70

Methods#

onDiscard#

Optional onDiscard(): void

The callback function called when discard is clicked

Returns#

void

Defined in#

form/EntityForm.tsx:104


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.schemaEntitySchema<M>
props.valuesM

Returns#

Promise<void>

Defined in#

form/EntityForm.tsx:91


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:110


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:115