Function: groupFieldsIntoSections()
function groupFieldsIntoSections<T extends SectionField>(fields: T[]): Section<T>[];Defined in: shared/forms/group-fields-into-sections.ts:28
Pre-processes a flat array of form fields into sections.
A section-header field starts a new grouped section. A section-unset
field ends the current section, returning subsequent fields to ungrouped
rendering. Fields before any header or after an unset render flat.
Type Parameters
| Type Parameter |
|---|
T extends SectionField |
Parameters
| Parameter | Type |
|---|---|
fields | T[] |
Returns
Section<T>[]