WarUI

Expansion state persistence

GRID-A17-F15P1baselinePlanned

Serializes the tree expansion state and the open detail state into a compact object keyed by stable row ids. Applications can save it to storage or a URL and restore it later. Restoring tolerates missing ids and lazily loaded paths.

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

Live example

A tree plus master-detail grid with a JSON state viewer.

Expected behavior

After expanding nodes and reloading, the same nodes and details reopen. The JSON viewer shows the state, including the version field.

Planned API surface

getExpansionStatesetExpansionStateexpansionStatePersistence ('none' | 'localStorage' | 'sessionStorage' | custom adapter)persistenceKeyonExpansionStateChanged

Acceptance criteria

  • The state includes a schema version (pending)
  • Unknown ids are ignored without error (pending)
  • Restoring lazy paths loads ancestors in order before expanding descendants (pending)
  • Persistence writes are debounced (pending)
  • A custom adapter receives get and set calls (pending)