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​
path​
• path: string
Path of the collection this entity is located
Defined in​
schemaOrResolver​
• schemaOrResolver: EntitySchema
<M
> & EntitySchemaResolver
<M
>
Use to resolve the schema properties for specific path, entity id or values
Defined in​
status​
• status: EntityStatus
New or existing status
Defined in​
Methods​
onDiscard​
â–¸ Optional
onDiscard(): void
The callback function called when discard is clicked
Returns​
void
Defined in​
onEntitySave​
â–¸ Optional
onEntitySave(props
): Promise
<void
>
The callback function called when Save is clicked and validation is correct
Parameters​
Name | Type |
---|---|
props | Object |
props.entityId | undefined | string |
props.path | string |
props.previousValues? | M |
props.schema | EntitySchema <M > |
props.values | M |
Returns​
Promise
<void
>
Defined in​
onModified​
â–¸ Optional
onModified(dirty
): void
The callback function when the form is dirty, so the values are different from the original ones
Parameters​
Name | Type |
---|---|
dirty | boolean |
Returns​
void
Defined in​
onValuesChanged​
â–¸ Optional
onValuesChanged(values?
): void
The callback function when the form original values have been modified
Parameters​
Name | Type |
---|---|
values? | M |
Returns​
void