LayoutOf

The type of the layout of one level.

The layout of one level whose value type is TValue, in a form whose data type is TRoot, with the structure slots and form components of TRegistry. Names in it are keys of the level itself, never paths. An inline entry receives the form as a FormHandle; it submits without submit meta, which a level does not know.

Type parameters

NameDescription
TRegistryThe registry the forms are built with, as typeof registry.
TValueThe value type of the level.
TRootThe data type of the form the level is part of. Defaults to TValue, for a level that is the whole form, such as the data of a field group.

Example

const customerLayout: LayoutOf<typeof registry, Customer> = [
  { section: 'Customer', layout: ['name', 'billing'] },
  { component: 'SubmitButton', props: { label: 'Save' } },
]

See also