Skip to content
CdsTable

Structure and headers

Controlling the structure of the table: header grouping, merged cells, the slots around the table, resizing columns and describing columns declaratively with components.

Storybook GitLab Figma
Test coverage: 0% — low coverage
API in specs
0 / 72 props, events, slots and exposed members with a test
Test cases
13 unit · 0 browser
Code coverage
15.2% lines · 7.4% branches measured in v4.0.0-alpha.13
A11y (axe)
50 recommendations in 39 stories measured in v4.0.0-alpha.11

Grouping headers ​

A nested children array on a column joins several columns under a shared header — the header becomes multi-level.

Merging cells ​

The column's customCell function returns colSpan/rowSpan for a specific cell, while colSpan on the column itself merges header cells. A cell with colSpan: 0 is not rendered.

The header, toolbar and footer slots add your own areas around the table, and the pagination prop adds built-in pagination with a record counter and a page size selector.

Resizing columns ​

The column's resizable property enables dragging the header border. The new width is reported by the resize-column event — store it in the column description.

Declarative column descriptions ​

Instead of the columns array, columns can be described in the template with the CdsTableColumn and CdsTableColumnGroup components — handy when headers and cells need their own markup.