WarUI

Value Parsing, Setting and Formatting

GRID-A14-F16P1baselinePlanned

Separates the editor value, the stored value and the displayed value using parser, setter and formatter hooks. This allows nested fields, computed writes and converting a value into a different type before it is stored.

Planned. This page shows the specification from issue #193. The live example, source for every framework and the API reference replace it when the feature ships.

Live example

A contacts grid with a nested city field and a computed Full Name column.

Expected behavior

Editing Full Name writes firstName and lastName through the setter. The parser changes the value before validation. The formatter controls how the value is displayed. The event log shows the raw, parsed and stored values.

Planned API surface

columns[].valueGettercolumns[].valueSettercolumns[].valueParsercolumns[].valueFormattercolumns[].editorValueGetter

Acceptance criteria

  • The pipeline order is editor value, then valueParser, then validation, then valueSetter (or a default write to the field). (pending)
  • A valueSetter that returns false means no change, so no event fires. (pending)
  • Nested field paths with dot notation are written without changing unrelated fields. (pending)
  • Formatted display text is never written back to the data. (pending)