formModelExpand
Overview
Returns the relations that a view's FormModel renders as inline fieldsets.
FormModel uses the expand prop when it receives one, and the model config's expand otherwise. A view calls this to send the same list as the request's expand parameter, so a fetch or save expands exactly the relations that the form shows inline.
Signature
formModelExpand(formModelProps, configExpand)
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
| formModelProps | any | yes | The merged props from useFormModelProps. |
| configExpand | string[] | yes | The model config's expand. |
Returns
string[]
The relation names. The array is empty when neither source names any.
Source
client/lib/use/useFormModelProps.js:63