Shows the Table in dense mode (takes up less space).
flat
?: boolean = undefined
Uses flat design, removing the box-shadow around the table.
rows
: QTableRow[] = []
Rows of the table.
Usage
Basic Usage and Pagination
Pass columns and rows to display a dataset. Each column needs a
unique name, a header label and a field that reads a row
value. This fictional meteorite catalogue has twelve records: use the footer to change pages or
the number of rows shown. Select a sortable heading once for ascending order, twice for descending
order, and a third time to clear sorting.
Atlas specimen catalogue
12 records · accession, specimen and class
AT-021
Copper Dune
Iron
AT-022
Blue Moraine
Stone
AT-023
Lantern Ridge
Stony-iron
AT-024
Quiet Basin
Stone
AT-025
Red Mesa
Iron
Unsorted
On narrow screens, scroll the table sideways. Its scroll area and sort buttons are
keyboard accessible.
Formatting and Custom Sorting
Use format to change a displayed value while retaining its raw value for
sorting. A function field can combine row properties. A custom sort receives strings and defines the ascending comparison; QTable reverses it for descending order.
Try sorting Class, Mass and Storage below.
Copper Dune
Iron
1,840 g
A / 03
Blue Moraine
Stone
128 g
B / 01
Lantern Ridge
Stony-iron
642 g
C / 02
Quiet Basin
Stone
73 g
B / 04
Red Mesa
Iron
2,560 g
A / 01
Unsorted
Class
Custom order: Stone → Stony-iron → Iron.
Mass
Formatted in grams, sorted numerically and aligned right.
Storage
Cabinet and drawer combined into one field, with padded drawer numbers.
Table Appearance
flat removes the table shadow, bordered adds an outline, and dense reduces cell padding and the minimum row height. Toggle each option on the
same table to compare their effects.
AT-021
Copper Dune
Iron
AT-022
Blue Moraine
Stone
AT-023
Lantern Ridge
Stony-iron
Unsorted
Filtering and Custom Cells
Filtering and selection are application state. Pass filtered rows to QTable;
use bodyCell for every default cell, or bodyCellSelect to override
only the column named select. Cell snippets return a <td> and preserve its supplied style. This generic snippet reads string fields
directly; custom snippets handle their own formatting and computed fields. Selections here
remain checked when filtering or changing pages.
Browse the collection
12 of 12 specimens shown
Select
AT-021
Copper Dune
Iron
AT-022
Blue Moraine
Stone
AT-023
Lantern Ridge
Stony-iron
AT-024
Quiet Basin
Stone
AT-025
Red Mesa
Iron
Unsorted
0 selected
Localization
Choose a language to translate pagination, sorting labels and announcements. Column headings
and specimen names remain your content. The language chooser is scoped to this example; see language setup for application configuration.