OGE logoOGE

Multi-Column ComboBox

<oge-multi-column-combo-box> is a combo box whose popup is a small data grid: columns with captions, widths, Intl formats and cell templates, a sticky header, row and cell keyboard navigation, search across the chosen columns, virtual scrolling and remote paged data — single or multiple selection, with signals, Signal Forms or reactive forms.

APG combobox + grid columns remote paging forms

Basic usage

Give it [columns] — field (dot-notation), caption, width and format — plus the select box mapping. Typing searches every searchable column by its formatted text; the field shows displayExpr (default: the first column).

columns format searchable
value: 3

Cell templates & formats

A column's cellTemplate takes over the cell (it keeps its gridcell role); format also accepts a function of the raw value and the row. disabledExpr makes rows inert.

cellTemplate format() disabledExpr

Multiple selection

selectionMode="multiple" makes value an array, renders removable chips (Backspace removes the last one), keeps the popup open while picking and sets aria-multiselectable.

selectionMode maxDisplayedTags
Desk lampMonitor arm

Remote data

10,000 accounts behind a CustomDataSource: [dataSource] pages 50 rows at a time as the virtual window scrolls, sends the typed text as searchText (debounced, superseded requests aborted) and caches each search.

dataSource virtualScroll pageSize

Forms

A full form editor: ControlValueAccessor and Signal Forms FormValueControl — [formField] carries required/touched/errors into the field chrome.

[formField] required

Keyboard & accessibility

The editor implements the WAI-ARIA APG combobox with grid popup pattern: the input is a role="combobox" with aria-haspopup="grid", DOM focus never leaves it, and aria-activedescendant names the active gridcell. Rows carry aria-selected and aria-rowindex; the grid reports aria-rowcount (the server total in remote mode, or -1 while it is open-ended) and aria-colcount.

  • ↓/↑ open the popup and move between rows; PgUp/PgDn jump ten rows.
  • Once the keyboard is in the grid, ←/→ move between cells (mirrored in RTL), Home/End go to the first/last cell and Ctrl+Home/End to the first/last row. Before that they move the text caret.
  • Enter commits the active row (Space too, after navigating); Alt+↑ commits and closes; Esc closes, then clears the search.
  • In multiple mode Backspace on an empty search removes the last chip.