WarUI

Value Setters and Parsers

GRID-A03-F13P0baselinePlanned

When a cell is edited, a valueParser converts the raw input to a typed value and a valueSetter writes it back into the row data, which may be a nested or derived location. The setter returns whether a change occurred, so the grid knows whether to refresh and fire events.

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

Live example

People rows. Full name is an editable column with getter and setter. Salary is editable with a numeric parser.

Expected behavior

Editing Full name updates firstName and lastName, visible in debug columns. Entering '1,200' in salary parses to 1200. If the setter returns false, the cell reverts and no change event fires.

Planned API surface

columnDef.valueParsercolumnDef.valueSetterValueSetterParams (oldValue, newValue, data, node)onCellValueChangedapi.setDataValue

Acceptance criteria

  • The parser runs before the setter (pending)
  • The setter return value controls the refresh and event emission (pending)
  • onCellValueChanged includes oldValue, newValue, colId and the row id (pending)
  • setDataValue goes through the same parser and setter pipeline (pending)
  • For field columns without a setter, the default setter writes to the nested path (pending)