Field formatting
Fields can format values declaratively and client-side without changing
the raw value in the store/schema. A field carries a format spec, a
JSON-safe value formatter (no code in the schema), that the renderer
applies at display time.
Format keys are a closed, typed set (FieldFormatRegistry):
timestamp, date, boolean, currency, priority, number, decimal,
bigInt, unit, enumOption.
Format a number with a unit, CLDR/Intl.NumberFormat-correct per locale:
{ format: "unit", unit: "m2", unitDisplay: "short" } // "58 m²"unitis a closed set:"m2" | "km" | "m" | "kg" | "percent".unitDisplay:"long" | "short" | "narrow".- Note:
style:"unit"withunit:"percent"does not multiply by 100 (unlikestyle:"percent"), percent-as-unit is raw-fractional.
enumOption
Section titled “enumOption”Resolve an enum value into a translated label client-side:
{ format: "enumOption", keyPrefix: "jobstatus" }- The i18n key follows the convention
<keyPrefix>:<value>. - Falls back to the raw value when the key isn’t translated (same rule
as
buildOptionLabels). - Use it on
projectionDetailfields andentityList/projectionList/relatedListcolumns that would otherwise show bare option values.
Where it applies
Section titled “Where it applies”Formats are declared where field display is configured (screen columns /
detail fields / tables). The renderer (render-field, renderer
DataTableCell) applies the spec; readOnly paths use the active app
locale from the LocaleProvider.