WarUI

scrollToCell API with optional focus

GRID-A06-F15P0baselinePlanned

scrollToCell combines row and column scrolling into one coordinated move and can optionally move keyboard focus to the target cell. Both axes are resolved in a single operation, which avoids a two-step jitter. This supports validation-error navigation and find-in-grid.

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

Live example

100,000 rows by 200 columns with 20 seeded 'invalid' cells, and 'Next invalid' / 'Previous invalid' buttons.

Expected behavior

Each click moves the viewport once (no separate horizontal-then-vertical steps). With focus=true, the cell receives focus and the focus ring is fully visible.

Planned API surface

scrollToCell({row, col}, {align, behavior, focus})onCellFocused

Acceptance criteria

  • Horizontal and vertical offsets are applied in the same frame (instant) or the same animation (smooth). (pending)
  • With focus=true, document.activeElement is the target cell after the promise resolves. (pending)
  • The focused cell is never obscured by pinned panes, the header or a sticky footer. (pending)
  • The returned promise resolves with the final cell rect. (pending)