Pointer range selection
Users press on a cell and drag to select a rectangular range of cells, as in a spreadsheet. The range is highlighted and an anchor cell is marked as the active cell. This is the foundation for every other range interaction in this area.
Planned. This page shows the specification from issue #191. The live example, source for every framework and the API reference replace it when the feature ships.
Live example
A 200-row × 12-column sales grid. Range selection is on and nothing is selected.
Expected behavior
Pressing and dragging highlights a rectangle from the anchor to the pointer. Dragging near a viewport edge auto-scrolls the grid. Releasing the pointer fires rangeChangeEnd once. Clicking a single cell selects a 1×1 range.
Planned API surface
rangeSelection.enabledrangeSelection.modeselection:rangeChangeselection:rangeChangeEndgetSelectedRanges()clearRangeSelection()--war-grid-range-bg--war-grid-range-borderAcceptance criteria
- A drag from cell (r1,c1) to cell (r2,c2) produces exactly one range with normalized start and end bounds (pending)
- rangeChange fires during the drag, throttled to at most once per animation frame (pending)
- rangeChangeEnd fires exactly once when the pointer is released (pending)
- Auto-scroll starts within 24px of a viewport edge and stops when the pointer is released (pending)
- When rangeSelection.enabled is false, dragging does not select any range (pending)