Skip to content

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 ​

NameTypeRequiredDescription
formModelPropsanyyesThe merged props from useFormModelProps.
configExpandstring[]yesThe 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