WarUI

Initial Sort State from Configuration

GRID-A09-F06P0baselinePlanned

A grid can render already sorted by declaring the sort in the configuration. The sort can be set per column with a direction and priority, or through a top-level sortModel. The initial sort is applied before the first paint, so the user never sees the unsorted order flash on screen.

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

Live example

A leaderboard grid declared with Score desc (index 0) and Name asc (index 1).

Expected behavior

When the grid mounts, it is already sorted with both indicators visible. Editing the JSON and re-mounting applies the new initial sort. Initial configuration does not override sort changes the user makes later.

Planned API surface

columns[].initialSortcolumns[].initialSortIndexinitialState.sortModelonFirstDataRendered

Acceptance criteria

  • The first rendered frame already shows the sorted order (pending)
  • When both declaration styles are present, initialState.sortModel takes precedence and a warning is logged (pending)
  • initialSort is applied only at mount. Changing it on a live grid has no effect (documented) (pending)
  • An entry that references an unknown column is ignored with a warning (pending)
  • Priorities are taken from initialSortIndex. If an index is missing, the column order is used (pending)