OGE logoOGE

Data View

oge-data-view renders a templated collection — products, people, files — in responsive columns or one per row, with search, sorting, a filter hook, paging and optional selection.

No WAI-ARIA pattern exists for a data view, so it is composed from list primitives: a list of list items without selection (templates may hold links and buttons), an APG listbox with one tab stop once items select. Columns come from a container query on the view's own width, so it lays itself out correctly inside a drawer, a dialog or a narrow column.

templates grid / list container queries paging sort & search listbox selection

Basics & templates

Pass items and project an ogeDataViewItemTemplate; without one an item shows its displayExpr (or its title / name field). Without selection the view is a list of listitems, so links and buttons inside a template stay in the Tab order.

items ogeDataViewItemTemplate ariaLabel

Furniture

Oak desk

420 USD · ★ 4.6

Furniture

Mesh office chair

260 USD · ★ 4.4

Lighting

Desk lamp

45 USD · ★ 4.1

Storage

Wall shelf

89 USD · ★ 3.9

Textiles

Wool rug

150 USD · ★ 4.8

Lighting

Floor lamp

120 USD · ★ 4.2

Grid and list layouts

showLayoutSwitch renders a toggle-button group (aria-pressed) bound to the two-way layout. Grid columns are auto-fill cells of at least minItemWidth px, resolved by a container query on the view itself — resize the browser and the column count follows the card, not the window. The list layout may use its own row template.

layout showLayoutSwitch minItemWidth ogeDataViewListItemTemplate

Furniture

Oak desk

420 USD · ★ 4.6

Furniture

Mesh office chair

260 USD · ★ 4.4

Lighting

Desk lamp

45 USD · ★ 4.1

Storage

Wall shelf

89 USD · ★ 3.9

Textiles

Wool rug

150 USD · ★ 4.8

Lighting

Floor lamp

120 USD · ★ 4.2

Layout: grid

Paging

pageSize turns paging on and the view renders its own pager: previous / next, a constant-width numeric window with ellipses and the range text. Focus stays on the button you pressed (or moves to the current page when it disables) and the new page is announced politely. For the full oge-pagination bar, bind it to [(pageIndex)] and set showPager to false.

pageSize pageIndex pageChanged showPageInfo

Furniture

Oak desk

420 USD · ★ 4.6

Furniture

Mesh office chair

260 USD · ★ 4.4

Lighting

Desk lamp

45 USD · ★ 4.1

Storage

Wall shelf

89 USD · ★ 3.9

1–4 of 12

Page 1

Sorting, search & filtering

The search matches every word through the suite's text folding (case-, accent- and locale-insensitive) over searchExpr, and the result count is announced. sortOptions fill a native select with a direction toggle; text compares with the locale's collator, numbers numerically, empty values last. filter is a plain predicate hook.

searchEnabled searchExpr sortOptions sort filter

Accessories

Cable tray

25 USD · ★ 3.8 · sold out

Lighting

Desk lamp

45 USD · ★ 4.1 · sold out

Textiles

Linen curtains

75 USD · ★ 4

Storage

Wall shelf

89 USD · ★ 3.9

Accessories

Monitor arm

95 USD · ★ 4.5

Lighting

Floor lamp

120 USD · ★ 4.2

Textiles

Wool rug

150 USD · ★ 4.8

Lighting

Pendant light

180 USD · ★ 4.3

Storage

Filing cabinet

199 USD · ★ 3.7 · sold out

Furniture

Mesh office chair

260 USD · ★ 4.4

Furniture

Oak desk

420 USD · ★ 4.6

Furniture

Standing desk

640 USD · ★ 4.7

Selection

With selectionMode the view becomes an APG listbox with one tab stop: arrows walk the items in reading order (mirrored in RTL), Up / Down jump a row by the measured column count, Home / End, PageUp / PageDown turn the page, Space / Enter toggle and Ctrl+A selects everything. Options are leaves for assistive technology, so keep the template free of buttons and links.

selectionMode selectedKeys listbox Ctrl+A

Furniture

Oak desk

420 USD

Furniture

Mesh office chair

260 USD

Lighting

Desk lamp

45 USD

Storage

Wall shelf

89 USD

Textiles

Wool rug

150 USD

Lighting

Floor lamp

120 USD

Storage

Filing cabinet

199 USD

Furniture

Standing desk

640 USD

Selected: 2

Remote operations

With remoteOperations the view neither sorts, searches nor pages: it emits optionsChanged (sort, search text, page, page size) and renders items as the current page of itemCount. loading marks the items aria-busy and draws skeleton tiles while there is nothing to show yet.

remoteOperations optionsChanged itemCount loading

Furniture

Oak desk

420 USD

Furniture

Mesh office chair

260 USD

Lighting

Desk lamp

45 USD

1–3 of 12