Table
Composable read-only data table that renders a header and a virtualized list of rows.
This is a convenience wrapper around EditableTable for tables without editing support.
Columns are described by columns (
ColumnSpec).Data is provided via itemsCount and itemAt loader.
Sorting, filters, ordering and selection are controlled by state.
Generic parameters:
Parameters
total number of rows to display
loader that returns an item for the given index; may return null while loading
mutable table state (sorting, filters, order, selection)
list of visible/available column specifications
layout modifier for the whole table
optional row content shown when an item is null
stable key for rows; defaults to index
row primary action handler
optional long-press handler
optional context menu host, invoked with item and absolute position
styling hooks for rows and cells
container/content colors
string provider for UI text
list scroll state
horizontal scroll state of the whole table
header icons used for sort and filter affordances
surface shape of the table
outer border stroke; null uses theme default, TableDefaults.NoBorder disables border
When true, the table renders at its full intrinsic height with no internal vertical scrolling — every row is laid out at once. Use this when embedding the table inside an already-scrollable container (e.g. a row of another table). When false (default), the table occupies a bounded area and scrolls its rows internally.
Composable data table with custom table data state.
This overload allows passing custom table data that will be accessible in headers, footers, and edit cells.
Columns are described by columns (
ColumnSpec).Data is provided via itemsCount and itemAt loader.
Sorting, filters, ordering and selection are controlled by state.
Generic parameters:
T actual row item type.
C column key type.
E table data type - shared state accessible in headers, footers, and edit cells.
Parameters
total number of rows to display
loader that returns an item for the given index; may return null while loading
mutable table state (sorting, filters, order, selection)
list of visible/available column specifications
current table data instance - accessible in headers, footers, and edit cells
layout modifier for the whole table
optional row content shown when an item is null
stable key for rows; defaults to index
row primary action handler
optional long-press handler
optional context menu host, invoked with item and absolute position
styling hooks for rows and cells
container/content colors
string provider for UI text
list scroll state
horizontal scroll state of the whole table
header icons used for sort and filter affordances
surface shape of the table
outer border stroke; null uses theme default, TableDefaults.NoBorder disables border
When true, the table renders at its full intrinsic height with no internal vertical scrolling — every row is laid out at once. Use this when embedding the table inside an already-scrollable container (e.g. a row of another table). When false (default), the table occupies a bounded area and scrolls its rows internally.