WarUI

Nested field paths

GRID-A03-F02P0baselineShippedexperimental

Bind columns to nested properties with dot-notation paths, without flattening the data.

Live example

Expected behavior

Nested values display correctly. Removing an intermediate object shows an empty cell and does not throw. With suppression on, a key literally named 'address.city' is read instead of the nested path.

Source

const api = createGrid({
  rows: customers,
  columns: [
    { id: 'city', field: 'address.city' },
    { id: 'tier', field: 'account.tier' },
    { id: 'credit', field: 'account.limits.credit' },
  ],
  suppressFieldDotNotation: false,
});
api.getCellValue(row, 'city'); // undefined when address is missing

API reference

GRID-A03-F02 API
KindNameTypeDescription
OptioncolumnDef.field—A top-level key or a dot path such as address.city.
OptionsuppressFieldDotNotation—Treats the whole field string as one key.
MethodgetCellValue—Returns the resolved nested value.

Acceptance criteria

  • A path 'a.b.c' resolves to data.a.b.c (met)
  • A null or undefined intermediate resolves to undefined and renders empty (met)
  • When suppressFieldDotNotation is true, the full string is treated as one key (met)
  • getCellValue returns the resolved nested value (met)
  • Path resolution does not mutate the source data (met)