WarUI

Single row selection by click

GRID-A11-F01P0baselinePlanned

Lets the user select exactly one row by clicking it. Selecting another row replaces the previous selection. This is the simplest selection model, used for master-detail layouts where one record drives a detail panel.

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

Live example

A grid of 50 tickets with selectionMode 'single', no row selected, and a detail panel showing 'Nothing selected'.

Expected behavior

Clicking a row highlights it and updates the detail panel. Clicking another row moves the highlight to that row. When allowDeselectOnClick is on, clicking the selected row clears the selection.

Planned API surface

selectionMode: 'single'rowKeyselectedRowKeysonSelectionChangeallowDeselectOnClick

Acceptance criteria

  • Clicking a row sets selectedRowKeys to exactly one key. (pending)
  • Clicking a second row replaces the first key; selectedRowKeys never holds more than one key. (pending)
  • With allowDeselectOnClick=true, clicking the selected row empties selectedRowKeys. (pending)
  • With selectionMode 'none', clicks do not change the selection. (pending)
  • The selected row has aria-selected='true' and all other selectable rows have aria-selected='false'. (pending)