WarUI

Pivot Mode Toggle

GRID-A18-F01P0baselinePlanned

Switches WarGrid between a flat row view and pivot mode, where source rows are summarized into an aggregated result. Turning pivot mode on or off keeps the source data and column definitions unchanged. Users can return to the flat view without losing their configuration.

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

Live example

Flat grid of 5,000 synthetic order rows. Pivot mode is off. A preset config is ready: region as the row field and sum of revenue as the value field.

Expected behavior

Switching pivot mode on replaces the flat rows with one aggregated row per region and a revenue sum column. Switching it off restores the original rows, sort and scroll position. Each change logs one event with the previous and new state.

Planned API surface

pivot.enabledsetPivotEnabled()isPivotEnabled()onPivotModeChangecolumn.enablePivotcolumn.enableRowGroupcolumn.enableValue

Acceptance criteria

  • setPivotEnabled(true) renders aggregated rows within one render cycle. (pending)
  • setPivotEnabled(false) restores the flat row count exactly (5,000). (pending)
  • onPivotModeChange fires exactly once per state change and never on a no-op call. (pending)
  • Pivot zone configuration is kept across off/on toggles. (pending)
  • Columns without enablePivot, enableRowGroup or enableValue cannot be assigned to the matching zone. (pending)