WarUI

Value getters and formatters

GRID-A07-F14P0baselinePlanned

`valueGetter` derives a cell value from the row. `formatter` converts that value to display text without changing the underlying value used by sorting, filtering and export. Both are pure functions with typed params, so derived and formatted columns stay consistent across features.

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

Live example

A sales grid with a computed margin column and a formatter that renders percent.

Expected behavior

Turning the formatter off shows raw decimals and leaves the sort order unchanged. The CSV export follows the selected mode.

Planned API surface

valueGetterformatterValueGetterParamsFormatterParamsexportUsesFormattedgetCellValue

Acceptance criteria

  • Sort and filter use the getter value, not the formatted string, unless filterUsesFormatted is set. (pending)
  • Formatters receive {value,row,column,locale}. (pending)
  • getCellValue(rowId,colId,{formatted}) returns either form. (pending)
  • An exception inside a formatter is caught: the cell shows the raw value and one error is logged per column. (pending)