useFormModel
Overview
Using server model info and client model config, this hook provides the necessary reactive state for a form model.
Signature
useFormModel(props)
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
| props | object | yes | The reactive arguments. |
props Properties
| Name | Type | Required | Default | Description |
|---|---|---|---|---|
| expand | string[] | The fields to expand, if different from the default | ||
| fieldComponents | object | The field components to use, if different from the default, by field path | ||
| fieldProps | object | The field props to use, if different from the default, by field path | ||
| fields | string[] | The fields to display, if different from the default | ||
| widgetComponents | object | The widget components to use, if different from the default, by field path | ||
| widgetProps | object | The widget props to use, if different from the default, by field path |
Returns
The reactive state.
Source
client/lib/use/useFormModel.js:129