WarUI

Variable row heights via callback

GRID-A06-F06P0baselinePlanned

Rows can have different heights supplied by a getRowHeight callback. The grid keeps a cumulative height index so that offset-to-row lookup stays efficient. This supports dense data rows mixed with taller summary or group rows.

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

200,000 rows where every 10th row is 64px and all others are 32px. A probe shows the row index and offset under the mouse.

Expected behavior

Scrollbar length reflects the sum of all heights. The probe reports correct indices. After changing heights, the layout updates from the changed index while the visible content stays anchored.

Planned API surface

getRowHeightresetRowHeights(fromIndex)getRowOffset(index)getRowAtOffset(px)

Acceptance criteria

  • The scrollable height equals the sum of getRowHeight over all rows. (pending)
  • getRowAtOffset(getRowOffset(i)) === i for all sampled i. (pending)
  • resetRowHeights(k) invalidates only cached heights at index k and above. (pending)
  • Height lookups do not call getRowHeight for every row on each scroll frame (lazy, cached evaluation). (pending)