Skip to content

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 ​

NameTypeRequiredDescription
propsobjectyesThe reactive arguments.

props Properties ​

NameTypeRequiredDefaultDescription
expandstring[]The fields to expand, if different from the default
fieldComponentsobjectThe field components to use, if different from the default, by field path
fieldPropsobjectThe field props to use, if different from the default, by field path
fieldsstring[]The fields to display, if different from the default
widgetComponentsobjectThe widget components to use, if different from the default, by field path
widgetPropsobjectThe widget props to use, if different from the default, by field path

Returns ​

The reactive state.

Source ​

client/lib/use/useFormModel.js:133