buildFieldTypeOptionsHtml function presentation exported
Last updated: 2026-03-04T23:21:38.428Z
Location
Metrics
LOC: 13
Complexity: 2
Params: 1
Signature
buildFieldTypeOptionsHtml(selected?: string): : string
Summary
Builds a full set of <optgroup>/<option> HTML for all field types, grouped by category.
Source Code
export function buildFieldTypeOptionsHtml(selected?: string): string {
return getFieldTypeGroupedOptions(FIELD_TYPES)
.map(
(group) =>
`<optgroup label="${escapeHtml(group.label)}">${group.options
.map(
(entry) =>
`<option value="${entry.value}"${entry.value === selected ? " selected" : ""}>${escapeHtml(entry.label)}</option>`,
)
.join("")}</optgroup>`,
)
.join("");
}
Dependencies (Outgoing)
| Target | Type |
|---|---|
| FieldType | uses |
| getFieldTypeGroupedOptions | uses |
| SelectEntry | uses |
| escapeHtml | calls |
Impact (Incoming)
| Source | Type |
|---|---|
| buildGeneratorOptionsHtml | calls |