# API index

> Package `@umriss-ui/table`, version 0.40.0. Demo page: <https://romanhaendler.github.io/umriss-ui/table/api/>. Every page in one line: [llms.txt](https://romanhaendler.github.io/umriss-ui/table/llms.txt); every page in full: [llms-full.txt](https://romanhaendler.github.io/umriss-ui/table/llms-full.txt).

Everything `@umriss-ui/table` exports, with its signature. A component's props stand on its own page.

Demo page: https://romanhaendler.github.io/umriss-ui/table/api/

## Components

### `ColumnMenu`

[ColumnMenu](https://romanhaendler.github.io/umriss-ui/table/columnmenu/) – A menu in which the user shows, hides, reorders and pins the table's columns and picks a grouping (also called a column chooser). Offer it where the table has more columns than everyone needs.

Used on [Scenarios](https://romanhaendler.github.io/umriss-ui/table/), [Provider](https://romanhaendler.github.io/umriss-ui/table/provider/), [Column](https://romanhaendler.github.io/umriss-ui/table/column/), [Width and pinning](https://romanhaendler.github.io/umriss-ui/table/width-and-pinning/), [Search](https://romanhaendler.github.io/umriss-ui/table/search/), [Grouping](https://romanhaendler.github.io/umriss-ui/table/grouping/), [Tree rows](https://romanhaendler.github.io/umriss-ui/table/tree-rows/), [Toolbar](https://romanhaendler.github.io/umriss-ui/table/toolbar/), [Toolbar controls](https://romanhaendler.github.io/umriss-ui/table/toolbar-controls/), [ColumnMenu](https://romanhaendler.github.io/umriss-ui/table/columnmenu/), [View](https://romanhaendler.github.io/umriss-ui/table/view/) and [Server mode](https://romanhaendler.github.io/umriss-ui/table/server-mode/).

### `Export`

[Export](https://romanhaendler.github.io/umriss-ui/table/export/) – A button that writes the rows the user sees into a CSV file for a spreadsheet (also called download or export to Excel). Hand the application the text instead where it wants the clipboard or a file of its own.

Used on [Scenarios](https://romanhaendler.github.io/umriss-ui/table/), [Provider](https://romanhaendler.github.io/umriss-ui/table/provider/), [Sorting](https://romanhaendler.github.io/umriss-ui/table/sorting/), [Search](https://romanhaendler.github.io/umriss-ui/table/search/), [Grouping](https://romanhaendler.github.io/umriss-ui/table/grouping/), [Toolbar](https://romanhaendler.github.io/umriss-ui/table/toolbar/), [Toolbar controls](https://romanhaendler.github.io/umriss-ui/table/toolbar-controls/), [Export](https://romanhaendler.github.io/umriss-ui/table/export/) and [Server mode](https://romanhaendler.github.io/umriss-ui/table/server-mode/).

### `Pagination`

[Pagination](https://romanhaendler.github.io/umriss-ui/table/pagination/) – The bar under the table that splits long results into pages, with the page size to choose (also called a pager). The table pages only where one stands; without it every filtered row is shown.

Used on [Scenarios](https://romanhaendler.github.io/umriss-ui/table/), [First table](https://romanhaendler.github.io/umriss-ui/table/first-table/), [Filter](https://romanhaendler.github.io/umriss-ui/table/filter/), [Pre-filter](https://romanhaendler.github.io/umriss-ui/table/pre-filter/), [Grouping](https://romanhaendler.github.io/umriss-ui/table/grouping/), [Toolbar](https://romanhaendler.github.io/umriss-ui/table/toolbar/), [Toolbar controls](https://romanhaendler.github.io/umriss-ui/table/toolbar-controls/), [Pagination](https://romanhaendler.github.io/umriss-ui/table/pagination/), [Benchmark](https://romanhaendler.github.io/umriss-ui/table/benchmark/) and [Server mode](https://romanhaendler.github.io/umriss-ui/table/server-mode/).

### `Search`

[Search](https://romanhaendler.github.io/umriss-ui/table/search/) – A text field that narrows the table to the rows containing what the user types (also called a quick filter or global filter). Put it in the toolbar, or anywhere on the page.

Used on [Scenarios](https://romanhaendler.github.io/umriss-ui/table/), [First table](https://romanhaendler.github.io/umriss-ui/table/first-table/), [Provider](https://romanhaendler.github.io/umriss-ui/table/provider/), [Formats](https://romanhaendler.github.io/umriss-ui/table/formats/), [Sorting](https://romanhaendler.github.io/umriss-ui/table/sorting/), [Search](https://romanhaendler.github.io/umriss-ui/table/search/), [Filter](https://romanhaendler.github.io/umriss-ui/table/filter/), [Pre-filter](https://romanhaendler.github.io/umriss-ui/table/pre-filter/), [Grouping](https://romanhaendler.github.io/umriss-ui/table/grouping/), [Tree rows](https://romanhaendler.github.io/umriss-ui/table/tree-rows/), [Aggregate](https://romanhaendler.github.io/umriss-ui/table/aggregate/), [Selection](https://romanhaendler.github.io/umriss-ui/table/selection/), [Row appearance](https://romanhaendler.github.io/umriss-ui/table/row-appearance/), [RowDetail](https://romanhaendler.github.io/umriss-ui/table/rowdetail/), [Toolbar](https://romanhaendler.github.io/umriss-ui/table/toolbar/), [Toolbar controls](https://romanhaendler.github.io/umriss-ui/table/toolbar-controls/), [Export](https://romanhaendler.github.io/umriss-ui/table/export/), [View](https://romanhaendler.github.io/umriss-ui/table/view/), [Pagination](https://romanhaendler.github.io/umriss-ui/table/pagination/), [Virtualisation](https://romanhaendler.github.io/umriss-ui/table/virtualisation/), [Benchmark](https://romanhaendler.github.io/umriss-ui/table/benchmark/), [Server mode](https://romanhaendler.github.io/umriss-ui/table/server-mode/), [Grid mode](https://romanhaendler.github.io/umriss-ui/table/grid-mode/) and [Edits](https://romanhaendler.github.io/umriss-ui/table/edits/).

### `Toolbar`

[Toolbar](https://romanhaendler.github.io/umriss-ui/table/toolbar/) – The bar above the table that holds its search, column menu and export, shows how many rows match, and carries the bulk actions while rows are ticked (also called a table header bar).

Used on [Scenarios](https://romanhaendler.github.io/umriss-ui/table/), [First table](https://romanhaendler.github.io/umriss-ui/table/first-table/), [Provider](https://romanhaendler.github.io/umriss-ui/table/provider/), [Column](https://romanhaendler.github.io/umriss-ui/table/column/), [Width and pinning](https://romanhaendler.github.io/umriss-ui/table/width-and-pinning/), [Sorting](https://romanhaendler.github.io/umriss-ui/table/sorting/), [Search](https://romanhaendler.github.io/umriss-ui/table/search/), [Filter](https://romanhaendler.github.io/umriss-ui/table/filter/), [Pre-filter](https://romanhaendler.github.io/umriss-ui/table/pre-filter/), [Grouping](https://romanhaendler.github.io/umriss-ui/table/grouping/), [Tree rows](https://romanhaendler.github.io/umriss-ui/table/tree-rows/), [Aggregate](https://romanhaendler.github.io/umriss-ui/table/aggregate/), [Selection](https://romanhaendler.github.io/umriss-ui/table/selection/), [Row appearance](https://romanhaendler.github.io/umriss-ui/table/row-appearance/), [RowDetail](https://romanhaendler.github.io/umriss-ui/table/rowdetail/), [RowActions](https://romanhaendler.github.io/umriss-ui/table/rowactions/), [Toolbar](https://romanhaendler.github.io/umriss-ui/table/toolbar/), [Toolbar controls](https://romanhaendler.github.io/umriss-ui/table/toolbar-controls/), [ColumnMenu](https://romanhaendler.github.io/umriss-ui/table/columnmenu/), [Export](https://romanhaendler.github.io/umriss-ui/table/export/), [View](https://romanhaendler.github.io/umriss-ui/table/view/), [Pagination](https://romanhaendler.github.io/umriss-ui/table/pagination/), [Virtualisation](https://romanhaendler.github.io/umriss-ui/table/virtualisation/), [Benchmark](https://romanhaendler.github.io/umriss-ui/table/benchmark/), [Server mode](https://romanhaendler.github.io/umriss-ui/table/server-mode/) and [Edits](https://romanhaendler.github.io/umriss-ui/table/edits/).

## Hooks

### `useTable`

A table over your rows: the hook holds its state - sort, filters, search,
grouping, page, selection, column widths -, and the parts it returns are
typed at your row, so that a field name in `Column` is checked by the
compiler.

- `rows` – All rows in automatic mode; in server mode the page a server delivered for the current view.
- `options` – How a row is keyed, the view to start from and the handler that hears every change of it, and in server mode the server's count and the handler that hears every request.
- Returns The table's state and its parts: `Table`, `Column`,
`VerdictColumn`, `RowDetail`, `RowActions`, `Action` and `GroupBy`. Pass it
as `of` to a part that stands outside the table.

```ts
function useTable<Z>(rows: readonly Z[], options: TableOptions<Z>): Table<Z>;
```

Used on [Scenarios](https://romanhaendler.github.io/umriss-ui/table/), [Installation](https://romanhaendler.github.io/umriss-ui/table/installation/), [First table](https://romanhaendler.github.io/umriss-ui/table/first-table/), [Provider](https://romanhaendler.github.io/umriss-ui/table/provider/), [Column](https://romanhaendler.github.io/umriss-ui/table/column/), [Formats](https://romanhaendler.github.io/umriss-ui/table/formats/), [Width and pinning](https://romanhaendler.github.io/umriss-ui/table/width-and-pinning/), [Presets](https://romanhaendler.github.io/umriss-ui/table/presets/), [Sorting](https://romanhaendler.github.io/umriss-ui/table/sorting/), [Search](https://romanhaendler.github.io/umriss-ui/table/search/), [Filter](https://romanhaendler.github.io/umriss-ui/table/filter/), [Pre-filter](https://romanhaendler.github.io/umriss-ui/table/pre-filter/), [Grouping](https://romanhaendler.github.io/umriss-ui/table/grouping/), [Tree rows](https://romanhaendler.github.io/umriss-ui/table/tree-rows/), [Aggregate](https://romanhaendler.github.io/umriss-ui/table/aggregate/), [Selection](https://romanhaendler.github.io/umriss-ui/table/selection/), [Row appearance](https://romanhaendler.github.io/umriss-ui/table/row-appearance/), [RowDetail](https://romanhaendler.github.io/umriss-ui/table/rowdetail/), [RowActions](https://romanhaendler.github.io/umriss-ui/table/rowactions/), [Toolbar](https://romanhaendler.github.io/umriss-ui/table/toolbar/), [Toolbar controls](https://romanhaendler.github.io/umriss-ui/table/toolbar-controls/), [ColumnMenu](https://romanhaendler.github.io/umriss-ui/table/columnmenu/), [Export](https://romanhaendler.github.io/umriss-ui/table/export/), [View](https://romanhaendler.github.io/umriss-ui/table/view/), [Pagination](https://romanhaendler.github.io/umriss-ui/table/pagination/), [Virtualisation](https://romanhaendler.github.io/umriss-ui/table/virtualisation/), [Benchmark](https://romanhaendler.github.io/umriss-ui/table/benchmark/), [Server mode](https://romanhaendler.github.io/umriss-ui/table/server-mode/), [Grid mode](https://romanhaendler.github.io/umriss-ui/table/grid-mode/), [Edits](https://romanhaendler.github.io/umriss-ui/table/edits/) and [VerdictColumn](https://romanhaendler.github.io/umriss-ui/table/verdictcolumn/).

### `useTableSelection`

A small headless helper for row selection: it holds the selection as a set
and supplies the states for "select all" (including indeterminate).
What the selection means in the domain stays the application's business.

```ts
function useTableSelection<T extends string | number>(ids: readonly T[]): TableSelection<T>;
```

Used on [Selection](https://romanhaendler.github.io/umriss-ui/table/selection/).

## Functions

### `column`

A column preset that fits every table whose rows carry its field: create it
once, outside the component, and spread it into a `Column`. With more than
one field in `P`, name the field as the second type argument.

```ts
function column<P, K extends Field<P> = Field<P>>(preset: ColumnPreset<P, K>): ColumnPreset<P, K>;
```

Used on [Scenarios](https://romanhaendler.github.io/umriss-ui/table/), [First table](https://romanhaendler.github.io/umriss-ui/table/first-table/), [Formats](https://romanhaendler.github.io/umriss-ui/table/formats/), [Width and pinning](https://romanhaendler.github.io/umriss-ui/table/width-and-pinning/), [Presets](https://romanhaendler.github.io/umriss-ui/table/presets/), [Sorting](https://romanhaendler.github.io/umriss-ui/table/sorting/), [Filter](https://romanhaendler.github.io/umriss-ui/table/filter/), [Grouping](https://romanhaendler.github.io/umriss-ui/table/grouping/), [Tree rows](https://romanhaendler.github.io/umriss-ui/table/tree-rows/), [View](https://romanhaendler.github.io/umriss-ui/table/view/), [Virtualisation](https://romanhaendler.github.io/umriss-ui/table/virtualisation/), [Benchmark](https://romanhaendler.github.io/umriss-ui/table/benchmark/), [Server mode](https://romanhaendler.github.io/umriss-ui/table/server-mode/), [Grid mode](https://romanhaendler.github.io/umriss-ui/table/grid-mode/) and [VerdictColumn](https://romanhaendler.github.io/umriss-ui/table/verdictcolumn/).

### `columnFilter`

A filter for columns with values of type `W` and conditions of type `B`.
The compiler accepts it at every column whose value fits, and rejects it
otherwise. Create it outside the component, like a preset.

```ts
function columnFilter<W, B>(definition: ColumnFilter<W, B>): ColumnFilter<W, B>;
```

Used on [Filter](https://romanhaendler.github.io/umriss-ui/table/filter/).

### `rowFilter`

A filter over the rows of type `Z` with conditions of type `B`. Create it
outside the component, like a column filter, and name it in `rowFilters`.

```ts
function rowFilter<Z, B>(definition: RowFilter<Z, B>): RowFilter<Z, B>;
```

Used on [Filter](https://romanhaendler.github.io/umriss-ui/table/filter/) and [Toolbar controls](https://romanhaendler.github.io/umriss-ui/table/toolbar-controls/).

## Types

### `Absent`

A value that is not there: `null` or `undefined`.

```ts
type Absent = null | undefined;
```

Used on [Column](https://romanhaendler.github.io/umriss-ui/table/column/).

### `ActionProps`

Its table stands on [RowActions](https://romanhaendler.github.io/umriss-ui/table/rowactions/#type-ActionProps).

### `AggregateColumn<Z>`

A column that carries an aggregate, as the pipeline needs it.

| Prop | Type | Default | Description |
|---|---|---|---|
| `id` *required* | `string` | — |  |
| `read` *required* | `(row: Z) => unknown` | — |  |
| `aggregate` *required* | [`AggregateKind`](https://romanhaendler.github.io/umriss-ui/table/api/#type-AggregateKind)`  \|  `[`OwnAggregate`](https://romanhaendler.github.io/umriss-ui/table/api/#type-OwnAggregate)`<Z>` | — |  |

### `AggregateFor<W, Z>`

What a column accepts as `aggregate`: sums and averages for numbers, the
extremes for numbers and points in time, the range for points in time,
counts for every value with a text form - or a function of one's own.

```ts
type AggregateFor<W, Z> =
  | ([Present<W>] extends [number] ? "sum" | "avg" | "min" | "max" : never)
  | ([Present<W>] extends [Date] ? "min" | "max" | "range" : never)
  | (IsDisplayable<W> extends true ? "count" | "distinct" : never)
  | AggregateFunction<W, Z>;
```

### `AggregateFunction<W, Z>`

An aggregate of one's own: the values present and the rows of the group -
or of the filtered set, in the footer. Its result runs through the column's
presentation; `undefined` means there is none.

```ts
type AggregateFunction<W, Z> = (values: readonly Present<NoInfer<W>>[], rows: readonly Z[]) => Present<NoInfer<W>> | undefined;
```

### `AggregateKind`

The built-in aggregates. `range` is for points in time: the earliest and
the latest.

```ts
type AggregateKind = "sum" | "avg" | "min" | "max" | "range" | "count" | "distinct";
```

### `AggregateOptions`

Its table stands on [Aggregate](https://romanhaendler.github.io/umriss-ui/table/aggregate/#type-AggregateOptions).

### `CellEdit<Z>`

An edit the user committed - reported, not applied.

| Prop | Type | Default | Description |
|---|---|---|---|
| `rowKey` *required* | `string` | — | <br>Shown in: [Combine grid mode with groups, pinning and many rows (Grid mode)](https://romanhaendler.github.io/umriss-ui/table/grid-mode/#the-whole-grid), [Edit a comments column (Edits)](https://romanhaendler.github.io/umriss-ui/table/edits/#comments-column), [Check an edit before it is reported (Edits)](https://romanhaendler.github.io/umriss-ui/table/edits/#validated-edits) and 1 more |
| `columnId` *required* | `string` | — | <br>Shown in: [Combine grid mode with groups, pinning and many rows (Grid mode)](https://romanhaendler.github.io/umriss-ui/table/grid-mode/#the-whole-grid), [Check an edit before it is reported (Edits)](https://romanhaendler.github.io/umriss-ui/table/edits/#validated-edits), [Plan the team's capacity (Scenarios)](https://romanhaendler.github.io/umriss-ui/table/#plan-the-team-capacity) |
| `value` *required* | `unknown` | — | The editor's value: text for `"text"`, a number or null for `"number"`, a day or null for `"date"`, an option for `"select"`.<br>Shown in: [Combine grid mode with groups, pinning and many rows (Grid mode)](https://romanhaendler.github.io/umriss-ui/table/grid-mode/#the-whole-grid), [Edit a comments column (Edits)](https://romanhaendler.github.io/umriss-ui/table/edits/#comments-column), [Check an edit before it is reported (Edits)](https://romanhaendler.github.io/umriss-ui/table/edits/#validated-edits) and 1 more |
| `row` *required* | `Z` | — | <br>Shown in: [Check an edit before it is reported (Edits)](https://romanhaendler.github.io/umriss-ui/table/edits/#validated-edits), [Plan the team's capacity (Scenarios)](https://romanhaendler.github.io/umriss-ui/table/#plan-the-team-capacity) |

Used on [Edits](https://romanhaendler.github.io/umriss-ui/table/edits/).

### `CellEditorProps<W, Z>`

What an editor of one's own receives. The table holds the draft; Enter,
Escape and Tab stay the table's, bubbling up from the field.

| Prop | Type | Default | Description |
|---|---|---|---|
| `value` *required* | `W \| null` | — | The draft - the cell's value until the field changes it. |
| `commit` *required* | `(value?: W \| null) => void` | — | Commits - the draft, or the value given. A picker commits on its pick. |
| `row` *required* | `Z` | — |  |
| `invalid` *required* | `boolean` | — | The draft did not validate: the field shows it; the message stands beneath. |
| `label` *required* | `string` | — | The field's name: what is edited, for which row. The `FormField` around the editor already names a core field by it. |

#### Events

| Prop | Type | Default | Description |
|---|---|---|---|
| `onChange` *required* | `(value: W \| null) => void` | — | Changes the draft. |

### `ColumnBase`

Its table stands on [Column](https://romanhaendler.github.io/umriss-ui/table/column/#type-ColumnBase).

### `ColumnComponent<Z>`

The `Column` of a table, typed at its row: a field column names a field in
`value`, a computed column a function and an `id`. What it accepts as
`aggregate`, `filter`, `format` and `edit` follows from the type of its
value.

```ts
interface ColumnComponent<Z> {
  <W extends number | Absent>(
    props: Computed<Z, W> & { footer: "sum" | "avg"; aggregate?: never; format?: NumberFormat; children?: Presentation<W, Z>; share?: boolean },
  ): ReactNode;
  <W extends number | Absent>(
    props: Computed<Z, W> & {
      aggregate: "sum" | "avg" | "min" | "max" | "count" | "distinct";
      footer?: never;
      share?: boolean;
      format?: NumberFormat;
      children?: Presentation<W, Z>;
    },
  ): ReactNode;
  <W extends Date | Absent>(
    props: Computed<Z, W> & {
      aggregate: "min" | "max" | "range" | "count" | "distinct";
      footer?: never;
      format?: DateFormat;
      group?: DatePeriod;
      children?: Presentation<W, Z>;
    },
  ): ReactNode;
  <W extends Date | Absent>(
    props: Computed<Z, W> & {
      group: DatePeriod;
      aggregate?: "min" | "max" | "range" | "count" | "distinct";
      footer?: never;
      format?: DateFormat;
      children?: Presentation<W, Z>;
    },
  ): ReactNode;
  <W extends number | Absent>(
    props: Computed<Z, W> & { format: NumberFormat; aggregate?: AggregateFunction<W, Z>; share?: boolean; children?: Presentation<W, Z> },
  ): ReactNode;
  <W extends Date | Absent>(
    props: Computed<Z, W> & { format: DateFormat; group?: DatePeriod; aggregate?: AggregateFunction<W, Z>; children?: Presentation<W, Z> },
  ): ReactNode;
  <W>(
    props: Computed<Z, W> & {
      footer?: never;
      format?: never;
      aggregate?: AggregateFunction<W, Z>;
      children: Presentation<W, Z>;
    },
  ): ReactNode;
  <W extends Displayable | Absent>(
    props: Computed<Z, W> & { footer?: never; format?: never; aggregate?: "count" | "distinct" | AggregateFunction<W, Z>; children?: never },
  ): ReactNode;
  <K extends Field<Z>>(props: FieldColumn<Z, K>): ReactNode;
}
```

### `ColumnFilter`

Its table stands on [Filter](https://romanhaendler.github.io/umriss-ui/table/filter/#type-ColumnFilter).

### `ColumnMenuProps`

Its table stands on [ColumnMenu](https://romanhaendler.github.io/umriss-ui/table/columnmenu/#type-ColumnMenuProps).

### `ColumnPreset<P, K extends Field<P> = Field<P>>`

The properties of a column, as `column()` supplies them.

```ts
type ColumnPreset<P, K extends Field<P> = Field<P>> = FieldColumn<P, K>;
```

### `Computed<Z, W>`

A computed column's props: its value is a function of the row, so it needs
an `id`.

```ts
type Computed<Z, W> = ColumnBase &
  ValuePaths<W> & {
    /** The id is required where the value is a function. */
    id: string;
    value: (row: Z) => W;
    /* The two names stand here without a condition on the value type, unlike on
       a field column: the value of a computed column is derived from `value`,
       and a condition over this W is not yet resolved when the overload is
       chosen - `filter="range"` would then leave the whole column untyped. A
       filter of one's own is still checked against the value. */
    /** A filter in the column header: `"list"` offers the values that occur,
        `"range"` two bounds (meaningful only for numbers and points in time), a
        filter from `columnFilter` asks whatever it asks itself. */
    // eslint-disable-next-line @typescript-eslint/no-explicit-any -- the condition belongs to the filter
    filter?: "list" | "range" | ColumnFilter<Present<W>, any>;
    /** Edits the column's cells in place in grid mode - see a field column's `edit`. */
    edit?: "text" | "number" | "select" | "date" | ((editor: CellEditorProps<W, Z>) => ReactNode);
    /** What `edit="select"` offers.
      @default the values that occur */
    editOptions?: readonly Present<W>[];
    /** Checks a draft before it is reported; a message keeps the editor open. */
    validate?: (value: W | null, row: Z) => string | null | undefined;
  };
```

### `DateFormat`

The names of the standard presentations of a point in time.

```ts
type DateFormat = "date" | "time" | "dateTime";
```

### `DatePeriod`

The span a point in time is grouped by.

```ts
type DatePeriod = "day" | "week" | "month" | "year";
```

### `Displayable`

What can appear as text without `children`.

```ts
type Displayable = string | number | boolean | Date;
```

### `EditFor<W, Z>`

What a column accepts as `edit`: the core field for its value - `"text"`
for text, `"number"` for numbers, `"date"` for points in time, `"select"`
for text and numbers - or an editor of one's own.

```ts
type EditFor<W, Z> =
  | ([Present<W>] extends [string] ? "text" | "select" : never)
  | ([Present<W>] extends [number] ? "number" | "select" : never)
  | ([Present<W>] extends [Date] ? "date" : never)
  | ((editor: CellEditorProps<W, Z>) => ReactNode);
```

### `EditOptions<W, Z>`

The props a column carries for editing in grid mode (`<Table grid>`).

| Prop | Type | Default | Description |
|---|---|---|---|
| `edit` | [`EditFor`](https://romanhaendler.github.io/umriss-ui/table/api/#type-EditFor)`<W, Z>` | — | Edits the column's cells in place in grid mode: Enter, F2 or typing starts it, Enter or Tab commits, Escape cancels. The table applies nothing - the edit is reported through the table's `onCellEdit`.<br>Shown in: [Share a column between tables (Presets)](https://romanhaendler.github.io/umriss-ui/table/presets/#presets), [Combine grid mode with groups, pinning and many rows (Grid mode)](https://romanhaendler.github.io/umriss-ui/table/grid-mode/#the-whole-grid), [Edit a comments column (Edits)](https://romanhaendler.github.io/umriss-ui/table/edits/#comments-column) and 6 more |
| `editOptions` | `readonly `[`Present`](https://romanhaendler.github.io/umriss-ui/table/api/#type-Present)`<W>[]` | the values that occur | What `edit="select"` offers.<br>Shown in: [Share a column between tables (Presets)](https://romanhaendler.github.io/umriss-ui/table/presets/#presets), [Check an edit before it is reported (Edits)](https://romanhaendler.github.io/umriss-ui/table/edits/#validated-edits), [Save a row on purpose (Edits)](https://romanhaendler.github.io/umriss-ui/table/edits/#save-a-row-on-purpose) and 1 more |
| `validate` | `(value: W \| null, row: Z) => string \| null \| undefined` | — | Checks a draft before it is reported: a message keeps the editor open and stands beneath the field, as in a `FormField`; nothing lets it through.<br>Shown in: [Share a column between tables (Presets)](https://romanhaendler.github.io/umriss-ui/table/presets/#presets), [Combine grid mode with groups, pinning and many rows (Grid mode)](https://romanhaendler.github.io/umriss-ui/table/grid-mode/#the-whole-grid), [Check an edit before it is reported (Edits)](https://romanhaendler.github.io/umriss-ui/table/edits/#validated-edits) and 3 more |

### `ExportProps`

Its table stands on [Export](https://romanhaendler.github.io/umriss-ui/table/export/#type-ExportProps).

### `Field<Z>`

The field names of a row.

```ts
type Field<Z> = Extract<keyof Z, string>;
```

### `FieldColumn`

Its table stands on [Column](https://romanhaendler.github.io/umriss-ui/table/column/#type-FieldColumn).

### `FieldCondition<W>`

What can be set as a condition on a field: a list of its values, and for
numbers and points in time a range as well.

```ts
type FieldCondition<W> =
  | ListCondition<W>
  | ([Present<W>] extends [number] ? RangeCondition<number> : [Present<W>] extends [Date] ? RangeCondition<Date> : never);
```

### `FilterFor<W>`

What a column accepts as `filter`: `"list"` for every value with a text
form, `"range"` for numbers and points in time, a filter from `columnFilter`
only where its value type fits.

```ts
type FilterFor<W> =
  | (IsDisplayable<W> extends true ? "list" : never)
  | ([Present<W>] extends [number] ? "range" : [Present<W>] extends [Date] ? "range" : never)
  // eslint-disable-next-line @typescript-eslint/no-explicit-any -- the condition belongs to the filter; at the column only the value counts
  | ColumnFilter<Present<W>, any>;
```

### `FilterInputProps`

Its table stands on [Filter](https://romanhaendler.github.io/umriss-ui/table/filter/#type-FilterInputProps).

### `FormatFor<W>`

What a column accepts as `format`: a number format for numbers, a date
format for points in time, nothing for every other value.

```ts
type FormatFor<W> = [Present<W>] extends [number]
  ? NumberFormat
  : [Present<W>] extends [Date]
    ? DateFormat
    : never;
```

### `GroupByBase`

Its table stands on [Grouping](https://romanhaendler.github.io/umriss-ui/table/grouping/#type-GroupByBase).

### `GroupByComponent<Z>`

A value the table can be grouped by without being a column: no cell, no
export, no entry among the columns - only where a grouping is chosen.

```ts
interface GroupByComponent<Z> {
  <W extends string | number | boolean | Date | Absent>(
    props: GroupByBase & {
      /** The id is required where the value is a function. */
      id: string;
      value: (row: Z) => W;
      groupValue?: (value: Present<W>) => string | number | boolean | Date | Absent;
      group?: GroupFor<W>;
    },
  ): ReactNode;
  <K extends Field<Z>>(
    props: GroupByBase & {
      /** A field of the row; supplies the id at the same time. */
      value: K;
      id?: string;
      groupValue?: (value: Present<Z[K]>) => string | number | boolean | Date | Absent;
      group?: GroupFor<Z[K]>;
    },
  ): ReactNode;
}
```

### `GroupFor<W>`

`group` on a point in time: its rows are grouped by day, ISO week, month or
year.

```ts
type GroupFor<W> = [Present<W>] extends [Date] ? DatePeriod : never;
```

### `GroupingId<Z>`

A column or group key the table can be grouped by. The columns stand in the
JSX, which the hook does not see: a field name is suggested, any id is
taken, and one that nothing carries falls out.

```ts
type GroupingId<Z> = Field<Z> | (string & {});
```

### `GroupLevel<Z>`

One level of the grouping: what a row is grouped by on it.

| Prop | Type | Default | Description |
|---|---|---|---|
| `id` *required* | `string` | — |  |
| `value` *required* | `(row: Z) => unknown` | — | The grouping value - the column's value, or what `groupValue` or a date period made of it. Absent values form one group of their own. |
| `order` | `(row: Z) => unknown` | — | Where the groups of a key of one's own stand: by the smallest of this over their rows. Bands of a number are named "Small", "Large" and must not stand in the alphabet's order. |

### `IsDisplayable<W>`

`true` where the value present can appear as text without `children`
(`Displayable`), `false` otherwise - what decides the filters and
aggregates a column offers.

```ts
type IsDisplayable<W> = [Present<W>] extends [never]
  ? false
  : [Present<W>] extends [Displayable]
    ? true
    : false;
```

### `ListCondition<W>`

The condition of a list filter: the chosen values, an absent one as `null`.

```ts
type ListCondition<W> = readonly (Present<W> | null)[];
```

### `ModelColumn<Z, K extends string = string>`

A column as the model reads it - what sorting, search, hiding and the
export need of it, not its presentation.

| Prop | Type | Default | Description |
|---|---|---|---|
| `id` *required* | `K` | — |  |
| `label` | `string` | — | Human-readable label – for the column menu and the CSV header row. Not for the presentation of the header cell: that stays compositional. |
| `value` | `(row: Z) => string \| number \| null \| undefined` | — | The value for sorting and searching. `null`, `undefined` and `NaN` are absent: they stand last in both directions and match no search. |
| `compare` | `(a: Z, b: Z) => number` | — | A comparison of one's own; otherwise by the kind of the value. |
| `searchable` | `boolean` | `false` | Takes part in the free-text search. |
| `hideable` | `boolean` | `true` | May the user switch this column away? `false` for columns that identify the row – without them the table is no longer readable. |
| `resizable` | `boolean` | `false` | May the user drag the width? A column whose content fits anyway needs no grip. |
| `width` | `number` | — | Initial width in pixels; without it the browser decides. |

### `NumberField<Z>`

The field names whose value is a number or may be absent.

```ts
type NumberField<Z> = {
  [K in Field<Z>]: Z[K] extends number | Absent ? K : never;
}[Field<Z>];
```

### `NumberFormat`

The names of the standard presentations of a number.

```ts
type NumberFormat = "percent" | "count" | { decimals: number };
```

### `OwnAggregate<Z = never>`

An aggregate of one's own: the values present and the group's rows.

```ts
type OwnAggregate<Z = never> = (values: readonly unknown[], rows: readonly Z[]) => unknown;
```

Used on [Aggregate](https://romanhaendler.github.io/umriss-ui/table/aggregate/).

### `PaginationProps`

Its table stands on [Pagination](https://romanhaendler.github.io/umriss-ui/table/pagination/#type-PaginationProps).

### `Pin`

Where a pinned column stands: in the block before or after the others.

```ts
type Pin = "start" | "end";
```

### `Present<W>`

The value without the absence - that is what `children` gets.

```ts
type Present<W> = Exclude<W, Absent>;
```

### `Presentation<W, Z>`

What a column draws in a cell: the value present and its row.

```ts
type Presentation<W, Z> = (value: Present<W>, row: Z) => ReactNode;
```

Used on [Formats](https://romanhaendler.github.io/umriss-ui/table/formats/).

### `RangeCondition<W>`

The condition of a range filter: both bounds inclusive, each may be absent.

| Prop | Type | Default | Description |
|---|---|---|---|
| `from` | `W` | — |  |
| `to` | `W` | — |  |

### `RowActionsProps`

Its table stands on [RowActions](https://romanhaendler.github.io/umriss-ui/table/rowactions/#type-RowActionsProps).

### `RowAdd`

A new row the user saved: every column that edits, by column id.

| Prop | Type | Default | Description |
|---|---|---|---|
| `values` *required* | `Readonly<Record<string, unknown>>` | — | <br>Shown in: [Keep a list: add, change and delete rows (Edits)](https://romanhaendler.github.io/umriss-ui/table/edits/#keep-a-list) |

### `RowAttributes`

What a row carries in classes and data attributes.

```ts
type RowAttributes = { className?: string } & {
  [data: `data-${string}`]: string | undefined;
};
```

### `RowDelete<Z>`

A row the user asked to delete, and confirmed.

| Prop | Type | Default | Description |
|---|---|---|---|
| `rowKey` *required* | `string` | — | <br>Shown in: [Keep a list: add, change and delete rows (Edits)](https://romanhaendler.github.io/umriss-ui/table/edits/#keep-a-list), [Edit a dense table (Edits)](https://romanhaendler.github.io/umriss-ui/table/edits/#edit-a-dense-table) |
| `row` *required* | `Z` | — |  |

### `RowDetailProps`

Its table stands on [RowDetail](https://romanhaendler.github.io/umriss-ui/table/rowdetail/#type-RowDetailProps).

### `RowFilter`

Its table stands on [Filter](https://romanhaendler.github.io/umriss-ui/table/filter/#type-RowFilter).

### `RowGroup<Z>`

The rows of the filtered set that share one grouping value on one level.

| Prop | Type | Default | Description |
|---|---|---|---|
| `path` *required* | `string` | — | Identifies the group across renders and in the view: the keys of its path, outermost first. |
| `value` *required* | `unknown` | — | The grouping value; `undefined` for the group of absent values. |
| `level` *required* | `number` | — | 0 is the outermost level. |
| `rows` *required* | `Z[]` | — |  |
| `groups` *required* | [`RowGroup`](https://romanhaendler.github.io/umriss-ui/table/api/#type-RowGroup)`<Z>[]` | — | The groups of the next level; empty on the innermost. |
| `aggregates` *required* | `Record<string, unknown>` | — | Per column id, what its aggregate comes to over this group's rows. |

### `RowSave<Z>`

A Row draft the user saved ([ADR-0036](https://github.com/romanhaendler/umriss-ui/blob/main/docs/adr/0036-a-grid-edits-on-the-first-click-and-saves-rows-on-purpose.md)) - reported, not applied.

| Prop | Type | Default | Description |
|---|---|---|---|
| `rowKey` *required* | `string` | — | <br>Shown in: [Save a row on purpose (Edits)](https://romanhaendler.github.io/umriss-ui/table/edits/#save-a-row-on-purpose), [Check a whole row before it is saved (Edits)](https://romanhaendler.github.io/umriss-ui/table/edits/#check-a-whole-row), [Keep a list: add, change and delete rows (Edits)](https://romanhaendler.github.io/umriss-ui/table/edits/#keep-a-list) and 1 more |
| `changes` *required* | `Readonly<Record<string, unknown>>` | — | The columns the draft changed, by column id, with their editors' values.<br>Shown in: [Save a row on purpose (Edits)](https://romanhaendler.github.io/umriss-ui/table/edits/#save-a-row-on-purpose), [Check a whole row before it is saved (Edits)](https://romanhaendler.github.io/umriss-ui/table/edits/#check-a-whole-row), [Keep a list: add, change and delete rows (Edits)](https://romanhaendler.github.io/umriss-ui/table/edits/#keep-a-list) and 1 more |
| `row` *required* | `Z` | — | <br>Shown in: [Save a row on purpose (Edits)](https://romanhaendler.github.io/umriss-ui/table/edits/#save-a-row-on-purpose) |

Used on [Edits](https://romanhaendler.github.io/umriss-ui/table/edits/).

### `SearchProps`

Its table stands on [Search](https://romanhaendler.github.io/umriss-ui/table/search/#type-SearchProps).

### `SetFilter<Z>`

Sets a condition from outside. Typed at the field of the row, not at the
column: the columns stand in the JSX, and the hook does not see that
([ADR-0017](https://github.com/romanhaendler/umriss-ui/blob/main/docs/adr/0017-columns-are-declared-by-composition.md)). An id that is not a field name – a computed column or an `id` of
one's own – takes any condition; through it the condition of a filter of
one's own is set as well.

```ts
interface SetFilter<Z> {
  <B>(filter: RowFilter<Z, B>, condition: B | null): void;
  <K extends Field<Z>>(column: K, condition: FieldCondition<Z[K]> | null): void;
  <I extends string>(column: I & (I extends Field<Z> ? never : unknown), condition: unknown): void;
}
```

### `SortDirection`

The direction of one sort level: `asc` puts the smallest value on top,
`desc` the largest.

```ts
type SortDirection = "asc" | "desc";
```

### `SortLevel<K extends string = string>`

One level of the sort. Several levels act in their order: the second decides
only what the first leaves open.

| Prop | Type | Default | Description |
|---|---|---|---|
| `column` *required* | `K` | — | <br>Shown in: [Sort, arrange and export from controls of your own (First table)](https://romanhaendler.github.io/umriss-ui/table/first-table/#sort-arrange-and-export-from-controls-of-your-own), [A label wider than its column (Width and pinning)](https://romanhaendler.github.io/umriss-ui/table/width-and-pinning/#a-label-wider-than-its-column), [Sort by several columns (Sorting)](https://romanhaendler.github.io/umriss-ui/table/sorting/#sort-by-several-columns) and 10 more |
| `direction` *required* | [`SortDirection`](https://romanhaendler.github.io/umriss-ui/table/api/#type-SortDirection)<br>`"asc" \| "desc"` | — | <br>Shown in: [Sort, arrange and export from controls of your own (First table)](https://romanhaendler.github.io/umriss-ui/table/first-table/#sort-arrange-and-export-from-controls-of-your-own), [A label wider than its column (Width and pinning)](https://romanhaendler.github.io/umriss-ui/table/width-and-pinning/#a-label-wider-than-its-column), [Sort by several columns (Sorting)](https://romanhaendler.github.io/umriss-ui/table/sorting/#sort-by-several-columns) and 10 more |

### `Table<Z>`

What `useTable` returns: the table's state, and its parts typed at the
row. Pass it as `of` to a part that stands outside the table.

| Prop | Type | Default | Description |
|---|---|---|---|
| `Table` *required* | `(props: `[`TableProps`](https://romanhaendler.github.io/umriss-ui/table/first-table/#type-TableProps)`<Z>) => ReactNode` | — | <br>Shown in: [A first table (Installation)](https://romanhaendler.github.io/umriss-ui/table/installation/#first-table), [Show a list of services (First table)](https://romanhaendler.github.io/umriss-ui/table/first-table/#first-table), [Search and page from a header of your own (First table)](https://romanhaendler.github.io/umriss-ui/table/first-table/#search-and-page-from-a-header-of-your-own) and 118 more |
| `Column` *required* | [`ColumnComponent`](https://romanhaendler.github.io/umriss-ui/table/api/#type-ColumnComponent)`<Z>` | — | <br>Shown in: [A first table (Installation)](https://romanhaendler.github.io/umriss-ui/table/installation/#first-table), [Show a list of services (First table)](https://romanhaendler.github.io/umriss-ui/table/first-table/#first-table), [Search and page from a header of your own (First table)](https://romanhaendler.github.io/umriss-ui/table/first-table/#search-and-page-from-a-header-of-your-own) and 118 more |
| `VerdictColumn` *required* | [`VerdictColumnComponent`](https://romanhaendler.github.io/umriss-ui/table/api/#type-VerdictColumnComponent)`<Z>` | — | <br>Shown in: [Pin columns to both sides (Width and pinning)](https://romanhaendler.github.io/umriss-ui/table/width-and-pinning/#pinned-both-sides), [Read a day's deliveries by depot (Grouping)](https://romanhaendler.github.io/umriss-ui/table/grouping/#the-dispatch-report), [Carry the worst verdict up (Aggregate)](https://romanhaendler.github.io/umriss-ui/table/aggregate/#worst-verdict) and 5 more |
| `RowDetail` *required* | `(props: `[`RowDetailProps`](https://romanhaendler.github.io/umriss-ui/table/rowdetail/#type-RowDetailProps)`<Z>) => ReactNode` | — | <br>Shown in: [Keep the header and the names in view (Width and pinning)](https://romanhaendler.github.io/umriss-ui/table/width-and-pinning/#sticky-parts), [Employees in the detail (Tree rows)](https://romanhaendler.github.io/umriss-ui/table/tree-rows/#employees-in-the-detail), [Own staff and teams (Tree rows)](https://romanhaendler.github.io/umriss-ui/table/tree-rows/#own-staff-and-teams) and 5 more |
| `RowActions` *required* | `(props: `[`RowActionsProps`](https://romanhaendler.github.io/umriss-ui/table/rowactions/#type-RowActionsProps)`) => ReactNode` | — | <br>Shown in: [Name the row (Column)](https://romanhaendler.github.io/umriss-ui/table/column/#row-header), [Pin columns to both sides (Width and pinning)](https://romanhaendler.github.io/umriss-ui/table/width-and-pinning/#pinned-both-sides), [Select a whole group (Grouping)](https://romanhaendler.github.io/umriss-ui/table/grouping/#a-whole-group-selected) and 7 more |
| `Action` *required* | `(props: `[`ActionProps`](https://romanhaendler.github.io/umriss-ui/table/rowactions/#type-ActionProps)`<Z>) => ReactNode` | — | <br>Shown in: [Name the row (Column)](https://romanhaendler.github.io/umriss-ui/table/column/#row-header), [Pin columns to both sides (Width and pinning)](https://romanhaendler.github.io/umriss-ui/table/width-and-pinning/#pinned-both-sides), [Select a whole group (Grouping)](https://romanhaendler.github.io/umriss-ui/table/grouping/#a-whole-group-selected) and 7 more |
| `GroupBy` *required* | [`GroupByComponent`](https://romanhaendler.github.io/umriss-ui/table/api/#type-GroupByComponent)`<Z>` | — | <br>Shown in: [Group by a value that is no column (Grouping)](https://romanhaendler.github.io/umriss-ui/table/grouping/#a-key-that-is-no-column), [Group twenty thousand rows (Grouping)](https://romanhaendler.github.io/umriss-ui/table/grouping/#twenty-thousand-rows), [Read a day's deliveries by depot (Grouping)](https://romanhaendler.github.io/umriss-ui/table/grouping/#the-dispatch-report) |
| `rows` *required* | `readonly Z[]` | — | All the rows passed in, including those the pre-filter does not admit. From `TableSnapshot`.<br>Shown in: [Search and page from a header of your own (First table)](https://romanhaendler.github.io/umriss-ui/table/first-table/#search-and-page-from-a-header-of-your-own) |
| `filtered` *required* | `readonly Z[]` | — | The filtered set: what the pre-filter admits and search and filters leave, across all pages. From `TableSnapshot`.<br>Shown in: [Select rows (Selection)](https://romanhaendler.github.io/umriss-ui/table/selection/#selection), [Scroll twenty thousand rows (Virtualisation)](https://romanhaendler.github.io/umriss-ui/table/virtualisation/#virtualisation) |
| `visible` *required* | `readonly Z[]` | — | What is rendered right now: the page or the window. From `TableSnapshot`.<br>Shown in: [Scroll twenty thousand rows (Virtualisation)](https://romanhaendler.github.io/umriss-ui/table/virtualisation/#virtualisation) |
| `page` *required* | `number` | — | The page shown, from 1. Without `Pagination` always 1. From `TableSnapshot`.<br>Shown in: [Search and page from a header of your own (First table)](https://romanhaendler.github.io/umriss-ui/table/first-table/#search-and-page-from-a-header-of-your-own) |
| `pageCount` *required* | `number` | — | How many pages the filtered set makes. From `TableSnapshot`.<br>Shown in: [Search and page from a header of your own (First table)](https://romanhaendler.github.io/umriss-ui/table/first-table/#search-and-page-from-a-header-of-your-own) |
| `pageSize` *required* | `number` | — | Rows per page. From `TableSnapshot`.<br>Shown in: [Search and page from a header of your own (First table)](https://romanhaendler.github.io/umriss-ui/table/first-table/#search-and-page-from-a-header-of-your-own) |
| `setPage` *required* | `(page: number) => void` | — | Changes the page, clamped to those that exist. From `TableSnapshot`.<br>Shown in: [Search and page from a header of your own (First table)](https://romanhaendler.github.io/umriss-ui/table/first-table/#search-and-page-from-a-header-of-your-own) |
| `setPageSize` *required* | `(size: number) => void` | — | Sets the rows per page; back to page one. From `TableSnapshot`.<br>Shown in: [Search and page from a header of your own (First table)](https://romanhaendler.github.io/umriss-ui/table/first-table/#search-and-page-from-a-header-of-your-own) |
| `search` *required* | `string` | — | The search text. From `TableSnapshot`.<br>Shown in: [Search and page from a header of your own (First table)](https://romanhaendler.github.io/umriss-ui/table/first-table/#search-and-page-from-a-header-of-your-own) |
| `setSearch` *required* | `(search: string) => void` | — | Sets the search text; back to page one. From `TableSnapshot`.<br>Shown in: [Search and page from a header of your own (First table)](https://romanhaendler.github.io/umriss-ui/table/first-table/#search-and-page-from-a-header-of-your-own) |
| `sort` *required* | `readonly `[`SortLevel`](https://romanhaendler.github.io/umriss-ui/table/api/#type-SortLevel)`[]` | — | The sort levels, the first one first – only over columns that registered. From `TableSnapshot`.<br>Shown in: [Sort, arrange and export from controls of your own (First table)](https://romanhaendler.github.io/umriss-ui/table/first-table/#sort-arrange-and-export-from-controls-of-your-own) |
| `toggleSort` *required* | `(column: string, additive?: boolean) => void` | — | Sorts by a column. With `additive` a level is added instead of replacing the sort. From `TableSnapshot`.<br>Shown in: [Sort, arrange and export from controls of your own (First table)](https://romanhaendler.github.io/umriss-ui/table/first-table/#sort-arrange-and-export-from-controls-of-your-own) |
| `hidden` *required* | `readonly string[]` | — | The ids of the hidden columns. From `TableSnapshot`.<br>Shown in: [Sort, arrange and export from controls of your own (First table)](https://romanhaendler.github.io/umriss-ui/table/first-table/#sort-arrange-and-export-from-controls-of-your-own) |
| `toggleColumn` *required* | `(column: string) => void` | — | Hides a column or shows it again. The row header stays. From `TableSnapshot`.<br>Shown in: [Sort, arrange and export from controls of your own (First table)](https://romanhaendler.github.io/umriss-ui/table/first-table/#sort-arrange-and-export-from-controls-of-your-own) |
| `order` *required* | `readonly string[]` | — | The order of the columns as ids, as the user chose it. From `TableSnapshot`.<br>Shown in: [Sort, arrange and export from controls of your own (First table)](https://romanhaendler.github.io/umriss-ui/table/first-table/#sort-arrange-and-export-from-controls-of-your-own) |
| `setOrder` *required* | `(order: readonly string[]) => void` | — | Reorders the columns – on header, body and footer at once. From `TableSnapshot`.<br>Shown in: [Sort, arrange and export from controls of your own (First table)](https://romanhaendler.github.io/umriss-ui/table/first-table/#sort-arrange-and-export-from-controls-of-your-own) |
| `pinned` *required* | `Readonly<Record<string, `[`Pin`](https://romanhaendler.github.io/umriss-ui/table/api/#type-Pin)`>>` | — | The pinned columns by id - the declared ones until the user chooses. From `TableSnapshot`.<br>Shown in: [Pin and size from controls of your own (Width and pinning)](https://romanhaendler.github.io/umriss-ui/table/width-and-pinning/#pin-and-size-from-controls-of-your-own) |
| `setPin` *required* | `(column: string, pin: `[`Pin`](https://romanhaendler.github.io/umriss-ui/table/api/#type-Pin)` \| null) => void` | — | Pins a column to the start or the end, or unpins it with `null`. From `TableSnapshot`.<br>Shown in: [Pin and size from controls of your own (Width and pinning)](https://romanhaendler.github.io/umriss-ui/table/width-and-pinning/#pin-and-size-from-controls-of-your-own) |
| `widths` *required* | `Readonly<Record<string, number>>` | — | The widths in pixels: those of the columns, and over them the dragged ones. From `TableSnapshot`.<br>Shown in: [Pin and size from controls of your own (Width and pinning)](https://romanhaendler.github.io/umriss-ui/table/width-and-pinning/#pin-and-size-from-controls-of-your-own) |
| `setWidth` *required* | `(column: string, width: number \| undefined) => void` | — | Sets the width of a column; `undefined` takes it back. From `TableSnapshot`.<br>Shown in: [Pin and size from controls of your own (Width and pinning)](https://romanhaendler.github.io/umriss-ui/table/width-and-pinning/#pin-and-size-from-controls-of-your-own) |
| `expanded` *required* | `readonly string[]` | — | The keys of the expanded rows. From `TableSnapshot`.<br>Shown in: [Open a detail from outside the table (RowDetail)](https://romanhaendler.github.io/umriss-ui/table/rowdetail/#open-a-detail-from-outside) |
| `toggleRow` *required* | `(key: string) => void` | — | Expands a row or collapses it. From `TableSnapshot`.<br>Shown in: [Open a detail from outside the table (RowDetail)](https://romanhaendler.github.io/umriss-ui/table/rowdetail/#open-a-detail-from-outside) |
| `filter` *required* | `Readonly<Record<string, unknown>>` | — | The conditions of the column filters and row filters by id, in the order in which they were set. Whatever fits no column and no row filter is absent. From `TableSnapshot`.<br>Shown in: [Set a condition from outside the table (Filter)](https://romanhaendler.github.io/umriss-ui/table/filter/#conditions-from-outside) |
| `setFilter` *required* | [`SetFilter`](https://romanhaendler.github.io/umriss-ui/table/api/#type-SetFilter)`<Z>` | — | Sets the condition of a column filter or a row filter; `null` clears it. Back to page one. A condition that does not fit the kind of the filter – a range on a list filter, a column without a filter, a row filter not in `rowFilters` – is passed over with a warning in development. From `TableSnapshot`.<br>Shown in: [Set a condition from outside the table (Filter)](https://romanhaendler.github.io/umriss-ui/table/filter/#conditions-from-outside), [Filter by a field no column shows (Filter)](https://romanhaendler.github.io/umriss-ui/table/filter/#a-field-no-column-shows), [Rows from a request (Filter)](https://romanhaendler.github.io/umriss-ui/table/filter/#rows-from-a-request) and 5 more |
| `conditionOf` *required* | `<B>(filter: `[`RowFilter`](https://romanhaendler.github.io/umriss-ui/table/filter/#type-RowFilter)`<Z, B>) => B \| null` | — | The condition of a row filter, as its type - `null` while it is lifted. From `TableSnapshot`.<br>Shown in: [Filter by a field no column shows (Filter)](https://romanhaendler.github.io/umriss-ui/table/filter/#a-field-no-column-shows), [Rows from a request (Filter)](https://romanhaendler.github.io/umriss-ui/table/filter/#rows-from-a-request), [Ask a question over several fields (Filter)](https://romanhaendler.github.io/umriss-ui/table/filter/#a-question-over-several-fields) and 3 more |
| `selection` *required* | [`TableSelection`](https://romanhaendler.github.io/umriss-ui/table/api/#type-TableSelection)`<string>` | — | The selection – its own or the one handed in through `selection`. From `TableSnapshot`.<br>Shown in: [Select rows (Selection)](https://romanhaendler.github.io/umriss-ui/table/selection/#selection), [Copy the selection (Export)](https://romanhaendler.github.io/umriss-ui/table/export/#copy-the-selection), [Scroll twenty thousand rows (Virtualisation)](https://romanhaendler.github.io/umriss-ui/table/virtualisation/#virtualisation) and 3 more |
| `grouping` *required* | `readonly string[]` | — | The ids the table is grouped by, the outermost first – only those a groupable column or a group key carries, at most three. From `TableSnapshot`.<br>Shown in: [Group and fold from controls of your own (Grouping)](https://romanhaendler.github.io/umriss-ui/table/grouping/#group-and-fold-from-controls-of-your-own) |
| `setGrouping` *required* | `(grouping: readonly string[]) => void` | — | Groups by these columns or group keys; `[]` ungroups. Back to page one. From `TableSnapshot`.<br>Shown in: [Group and fold from controls of your own (Grouping)](https://romanhaendler.github.io/umriss-ui/table/grouping/#group-and-fold-from-controls-of-your-own) |
| `setView` *required* | `(view: `[`TableView`](https://romanhaendler.github.io/umriss-ui/table/api/#type-TableView)`) => void` | — | Goes to a whole view; what it leaves out goes back to where the table starts, and names no column carries fall out. Not reported through `onViewChange`: two tables kept in step by `onViewChange: (v) => other.setView(v)` in both directions do not answer each other. A view with the content already shown changes nothing. From `TableSnapshot`.<br>Shown in: [Keep and restore a view (View)](https://romanhaendler.github.io/umriss-ui/table/view/#initial-view) |
| `folded` *required* | `readonly string[]` | — | The paths of the folded groups that still occur. From `TableSnapshot`.<br>Shown in: [Group and fold from controls of your own (Grouping)](https://romanhaendler.github.io/umriss-ui/table/grouping/#group-and-fold-from-controls-of-your-own) |
| `toggleFold` *required* | `(path: string) => void` | — | Folds a group or unfolds it. A group of one row does not fold. From `TableSnapshot`.<br>Shown in: [Group and fold from controls of your own (Grouping)](https://romanhaendler.github.io/umriss-ui/table/grouping/#group-and-fold-from-controls-of-your-own) |
| `foldAll` *required* | `() => void` | — | Folds every group that has more than one row. From `TableSnapshot`.<br>Shown in: [Fold groups into a summary (Grouping)](https://romanhaendler.github.io/umriss-ui/table/grouping/#the-overview) |
| `unfoldAll` *required* | `() => void` | — | Unfolds every group. From `TableSnapshot`.<br>Shown in: [Fold groups into a summary (Grouping)](https://romanhaendler.github.io/umriss-ui/table/grouping/#the-overview) |
| `branches` *required* | `readonly string[]` | — | Tree rows: the keys of the open branches. From `TableSnapshot`.<br>Shown in: [Open branches from controls of your own (Tree rows)](https://romanhaendler.github.io/umriss-ui/table/tree-rows/#open-branches-from-controls-of-your-own) |
| `toggleBranch` *required* | `(key: string) => void` | — | Tree rows: opens a branch or closes it. From `TableSnapshot`.<br>Shown in: [Open branches from controls of your own (Tree rows)](https://romanhaendler.github.io/umriss-ui/table/tree-rows/#open-branches-from-controls-of-your-own) |
| `unfoldAllBranches` *required* | `() => void` | — | Tree rows: opens every branch that has children. From `TableSnapshot`.<br>Shown in: [Open branches from controls of your own (Tree rows)](https://romanhaendler.github.io/umriss-ui/table/tree-rows/#open-branches-from-controls-of-your-own) |
| `foldAllBranches` *required* | `() => void` | — | Tree rows: closes every branch. From `TableSnapshot`.<br>Shown in: [Open branches from controls of your own (Tree rows)](https://romanhaendler.github.io/umriss-ui/table/tree-rows/#open-branches-from-controls-of-your-own) |
| `view` *required* | [`TableView`](https://romanhaendler.github.io/umriss-ui/table/api/#type-TableView) | — | The part of the state an application can keep; whatever still stands as the options set it up is absent. From `TableSnapshot`.<br>Shown in: [Set a condition from outside the table (Filter)](https://romanhaendler.github.io/umriss-ui/table/filter/#conditions-from-outside), [Fold groups into a summary (Grouping)](https://romanhaendler.github.io/umriss-ui/table/grouping/#the-overview), [Keep and restore a view (View)](https://romanhaendler.github.io/umriss-ui/table/view/#initial-view) |
| `asCsv` *required* | `() => string` | — | The filtered set in the visible columns as text for a spreadsheet - in server mode the page. From `TableSnapshot`.<br>Shown in: [Sort, arrange and export from controls of your own (First table)](https://romanhaendler.github.io/umriss-ui/table/first-table/#sort-arrange-and-export-from-controls-of-your-own) |
| `selectionAsText` *required* | `() => string` | — | The selected rows within the filtered set as tab-separated text under a header line - the text Ctrl+C writes. `""` with nothing selected. From `TableSnapshot`.<br>Shown in: [Copy the selection (Export)](https://romanhaendler.github.io/umriss-ui/table/export/#copy-the-selection) |
| `virtual` *required* | `boolean` | — | Whether it virtualises. From `TableSnapshot`.<br>Shown in: [Search and page from a header of your own (First table)](https://romanhaendler.github.io/umriss-ui/table/first-table/#search-and-page-from-a-header-of-your-own) |
| `rowCount` *required* | `number` | — | How many rows the filtered set has - in server mode the server's count. From `TableSnapshot`.<br>Shown in: [Search and page from a header of your own (First table)](https://romanhaendler.github.io/umriss-ui/table/first-table/#search-and-page-from-a-header-of-your-own) |
| `server` *required* | `boolean` | — | Whether it is in server mode: the rows are one page of a server's. From `TableSnapshot`.<br>Shown in: [Sort, arrange and export from controls of your own (First table)](https://romanhaendler.github.io/umriss-ui/table/first-table/#sort-arrange-and-export-from-controls-of-your-own) |

Used on [Scenarios](https://romanhaendler.github.io/umriss-ui/table/), [Installation](https://romanhaendler.github.io/umriss-ui/table/installation/), [First table](https://romanhaendler.github.io/umriss-ui/table/first-table/), [Provider](https://romanhaendler.github.io/umriss-ui/table/provider/), [Column](https://romanhaendler.github.io/umriss-ui/table/column/), [Formats](https://romanhaendler.github.io/umriss-ui/table/formats/), [Width and pinning](https://romanhaendler.github.io/umriss-ui/table/width-and-pinning/), [Presets](https://romanhaendler.github.io/umriss-ui/table/presets/), [Sorting](https://romanhaendler.github.io/umriss-ui/table/sorting/), [Search](https://romanhaendler.github.io/umriss-ui/table/search/), [Filter](https://romanhaendler.github.io/umriss-ui/table/filter/), [Pre-filter](https://romanhaendler.github.io/umriss-ui/table/pre-filter/), [Grouping](https://romanhaendler.github.io/umriss-ui/table/grouping/), [Tree rows](https://romanhaendler.github.io/umriss-ui/table/tree-rows/), [Aggregate](https://romanhaendler.github.io/umriss-ui/table/aggregate/), [Selection](https://romanhaendler.github.io/umriss-ui/table/selection/), [Row appearance](https://romanhaendler.github.io/umriss-ui/table/row-appearance/), [RowDetail](https://romanhaendler.github.io/umriss-ui/table/rowdetail/), [RowActions](https://romanhaendler.github.io/umriss-ui/table/rowactions/), [Toolbar](https://romanhaendler.github.io/umriss-ui/table/toolbar/), [Toolbar controls](https://romanhaendler.github.io/umriss-ui/table/toolbar-controls/), [ColumnMenu](https://romanhaendler.github.io/umriss-ui/table/columnmenu/), [Export](https://romanhaendler.github.io/umriss-ui/table/export/), [View](https://romanhaendler.github.io/umriss-ui/table/view/), [Pagination](https://romanhaendler.github.io/umriss-ui/table/pagination/), [Virtualisation](https://romanhaendler.github.io/umriss-ui/table/virtualisation/), [Benchmark](https://romanhaendler.github.io/umriss-ui/table/benchmark/), [Server mode](https://romanhaendler.github.io/umriss-ui/table/server-mode/), [Grid mode](https://romanhaendler.github.io/umriss-ui/table/grid-mode/), [Edits](https://romanhaendler.github.io/umriss-ui/table/edits/) and [VerdictColumn](https://romanhaendler.github.io/umriss-ui/table/verdictcolumn/).

### `TableInput<Z = unknown, K extends string = string>`

The view's state the model computes a table from, beside its rows and
columns: search, filter, sort, page, hidden columns, order, grouping, tree.

| Prop | Type | Default | Description |
|---|---|---|---|
| `search` | `string` | — |  |
| `filter` | `(row: Z) => boolean` | — | An additional filter beside the free-text search, e.g. a status choice. |
| `sort` | [`SortLevel`](https://romanhaendler.github.io/umriss-ui/table/api/#type-SortLevel)`<K> \| readonly `[`SortLevel`](https://romanhaendler.github.io/umriss-ui/table/api/#type-SortLevel)`<K>[] \| null` | — | One level or several. A single level means the same as a list holding only it. |
| `page` | `number` | — | 1-based; is clamped to the valid range. |
| `pageSize` | `number` | — |  |
| `hidden` | `readonly K[]` | — | Ids of columns switched away. Columns that are not hideable stay. |
| `order` | `readonly K[]` | — | The wanted column order. Columns not named follow in their natural order; unknown ids are passed over. |
| `grouping` | `{ levels: readonly `[`GroupLevel`](https://romanhaendler.github.io/umriss-ui/table/api/#type-GroupLevel)`<Z>[]; aggregates?: readonly `[`AggregateColumn`](https://romanhaendler.github.io/umriss-ui/table/api/#type-AggregateColumn)`<Z>[]; folded: ReadonlySet<string>; /** The collation of text keys; the provider's, where there is one. */ compareText?: (a: string, b: string) => number; }` | — | Groups the sorted filtered set; a page then counts lines, not rows. |
| `server` | `{ rowCount: number }` | — | Server mode: the rows are the page a server answered, and `rowCount` is its filtered set. The model then searches, filters, sorts, groups and pages nothing - it would do it over one page and call that the whole. |
| `tree` | [`TreeInput`](https://romanhaendler.github.io/umriss-ui/table/api/#type-TreeInput)`<Z>` | — | Tree rows: the rows are the roots, and these read their children. The model then sorts every level on its own, filters by core's path rule and pages nothing. |

### `TableOptions`

Its table stands on [First table](https://romanhaendler.github.io/umriss-ui/table/first-table/#type-TableOptions).

### `TableProps`

Its table stands on [First table](https://romanhaendler.github.io/umriss-ui/table/first-table/#type-TableProps).

### `TableRef`

What a part without a row type needs from a table – for `of`.

```ts
type TableRef = Omit<TableSnapshot<unknown>, "setFilter" | "conditionOf"> & {
  readonly Table: unknown;
  /** Without a row kind: any id, any condition. */
  setFilter(column: string, condition: unknown): void;
};
```

Used on [First table](https://romanhaendler.github.io/umriss-ui/table/first-table/).

### `TableRequest<K extends string = string>`

The request server mode reports to `onRequest`: the parts of the view that
decide the rows - search, conditions, sort, page and page size - and
nothing else, each at its default as well. A server has no default of the
table's to fall back on, and a request it has to complete is one it
completes wrongly. A width, an order, a pin or a fold is no part of it.

```ts
type TableRequest<K extends string = string> = Required<Pick<TableView<K>, "search" | "conditions" | "sort" | "page" | "pageSize">>;
```

Used on [Server mode](https://romanhaendler.github.io/umriss-ui/table/server-mode/).

### `TableSelection<T extends string | number>`

What `useTableSelection` returns: the selected keys and the gestures on
them. Give it to `useTable` as `selection` when the application holds the
selection.

| Prop | Type | Default | Description |
|---|---|---|---|
| `selected` *required* | `ReadonlySet<T>` | — | The keys currently selected.<br>Shown in: [Work through the alerts (Scenarios)](https://romanhaendler.github.io/umriss-ui/table/#work-through-the-alerts) |
| `isSelected` *required* | `(id: T) => boolean` | — | <br>Shown in: [Select rows (Selection)](https://romanhaendler.github.io/umriss-ui/table/selection/#selection), [Hold the selection yourself (Selection)](https://romanhaendler.github.io/umriss-ui/table/selection/#hold-the-selection-yourself) |
| `toggle` *required* | `(id: T) => void` | — | <br>Shown in: [Hold the selection yourself (Selection)](https://romanhaendler.github.io/umriss-ui/table/selection/#hold-the-selection-yourself) |
| `toggleAll` *required* | `() => void` | — | Selects all the keys passed in - or, when all of them are selected already, deselects them. Keys outside them stay as they are. |
| `clear` *required* | `() => void` | — | <br>Shown in: [Hold the selection yourself (Selection)](https://romanhaendler.github.io/umriss-ui/table/selection/#hold-the-selection-yourself), [Work through the alerts (Scenarios)](https://romanhaendler.github.io/umriss-ui/table/#work-through-the-alerts), [Find a late shipment (Scenarios)](https://romanhaendler.github.io/umriss-ui/table/#find-a-late-shipment) |
| `allSelected` *required* | `boolean` | — | true when every key passed in is selected. |
| `someSelected` *required* | `boolean` | — | true when some - but not all - are selected. |
| `count` *required* | `number` | — | <br>Shown in: [Select rows (Selection)](https://romanhaendler.github.io/umriss-ui/table/selection/#selection), [Hold the selection yourself (Selection)](https://romanhaendler.github.io/umriss-ui/table/selection/#hold-the-selection-yourself), [Copy the selection (Export)](https://romanhaendler.github.io/umriss-ui/table/export/#copy-the-selection) and 2 more |

### `TableSnapshot`

Its table stands on [First table](https://romanhaendler.github.io/umriss-ui/table/first-table/#type-TableSnapshot).

### `TableView<K extends string = string>`

Search, conditions, sort levels, page, page size, hidden columns, order,
dragged widths, the grouping and the pinned columns. Whatever is at its
default is absent. The pre-filter never belongs to it: it is a function of
the application.

| Prop | Type | Default | Description |
|---|---|---|---|
| `search` | `string` | — | <br>Shown in: [Show loading, empty, failed and no match (Row appearance)](https://romanhaendler.github.io/umriss-ui/table/row-appearance/#states), [Hand the table one page (Server mode)](https://romanhaendler.github.io/umriss-ui/table/server-mode/#only-pages), [Sort and search on the server (Server mode)](https://romanhaendler.github.io/umriss-ui/table/server-mode/#sort-and-search) and 3 more |
| `conditions` | `Readonly<Record<string, unknown>>` | — | The conditions of the column filters, per column. A condition for a column that does not exist, or whose filter is of another kind, falls out.<br>Shown in: [Ask a question over several fields (Filter)](https://romanhaendler.github.io/umriss-ui/table/filter/#a-question-over-several-fields), [A dispatcher's bar (Toolbar controls)](https://romanhaendler.github.io/umriss-ui/table/toolbar-controls/#a-dispatcher-s-bar), [Hand the table one page (Server mode)](https://romanhaendler.github.io/umriss-ui/table/server-mode/#only-pages) and 4 more |
| `sort` | `readonly `[`SortLevel`](https://romanhaendler.github.io/umriss-ui/table/api/#type-SortLevel)`<K>[]` | — | <br>Shown in: [Keep and restore a view (View)](https://romanhaendler.github.io/umriss-ui/table/view/#initial-view), [Hand the table one page (Server mode)](https://romanhaendler.github.io/umriss-ui/table/server-mode/#only-pages), [Sort and search on the server (Server mode)](https://romanhaendler.github.io/umriss-ui/table/server-mode/#sort-and-search) and 3 more |
| `page` | `number` | — | <br>Shown in: [Hand the table one page (Server mode)](https://romanhaendler.github.io/umriss-ui/table/server-mode/#only-pages), [Sort and search on the server (Server mode)](https://romanhaendler.github.io/umriss-ui/table/server-mode/#sort-and-search), [Name the values a list filter offers (Server mode)](https://romanhaendler.github.io/umriss-ui/table/server-mode/#filter-options) and 2 more |
| `pageSize` | `number` | — | <br>Shown in: [Hand the table one page (Server mode)](https://romanhaendler.github.io/umriss-ui/table/server-mode/#only-pages), [Sort and search on the server (Server mode)](https://romanhaendler.github.io/umriss-ui/table/server-mode/#sort-and-search), [Name the values a list filter offers (Server mode)](https://romanhaendler.github.io/umriss-ui/table/server-mode/#filter-options) and 2 more |
| `hidden` | `readonly K[]` | — | <br>Shown in: [Keep and restore a view (View)](https://romanhaendler.github.io/umriss-ui/table/view/#initial-view) |
| `order` | `readonly K[]` | — |  |
| `widths` | `Readonly<Record<string, number>>` | — | Column widths the user has dragged, in pixels. |
| `grouping` | `readonly K[]` | — | The columns and group keys the table is grouped by, the outermost first. |
| `folded` | `readonly string[]` | — | The paths of the folded groups. A path that no longer occurs falls out.<br>Shown in: [Fold groups into a summary (Grouping)](https://romanhaendler.github.io/umriss-ui/table/grouping/#the-overview) |
| `branches` | `readonly string[]` | — | Tree rows: the keys of the open branches. A key that no longer occurs falls out. |
| `pinned` | `Readonly<Record<string, `[`Pin`](https://romanhaendler.github.io/umriss-ui/table/api/#type-Pin)`>>` | — | The pinned columns, whole, once the user's choice deviates from what the columns declare - `{}` when every declared pin was undone. A column that does not exist falls out. |

Used on [View](https://romanhaendler.github.io/umriss-ui/table/view/).

### `ToolbarProps`

Its table stands on [Toolbar](https://romanhaendler.github.io/umriss-ui/table/toolbar/#type-ToolbarProps).

### `ToolbarSize`

The size of a toolbar's controls.

```ts
type ToolbarSize = "sm" | "md";
```

### `TreeInput<Z>`

Tree rows for the model: how a row is keyed, how its children are read,
and which branches are open.

| Prop | Type | Default | Description |
|---|---|---|---|
| `key` *required* | `(row: Z) => string` | — |  |
| `children` *required* | `(row: Z) => readonly Z[] \| undefined` | — | `undefined` a leaf, an array a branch - the rule of core's reader. |
| `open` *required* | `ReadonlySet<string>` | — | The keys of the open branches. |
| `admit` | `(row: Z) => boolean` | — | The pre-filter: a row it does not admit is gone with its subtree. |

### `ValuePaths`

Its table stands on [Column](https://romanhaendler.github.io/umriss-ui/table/column/#type-ValuePaths).

### `VerdictBase`

Its table stands on [VerdictColumn](https://romanhaendler.github.io/umriss-ui/table/verdictcolumn/#type-VerdictBase).

### `VerdictColumnComponent<Z>`

The `VerdictColumn` of a table, typed at its row: a numeric field, or a
function with an `id`, whose value is read against `limits` and shown with
its verdict.

```ts
interface VerdictColumnComponent<Z> {
  (props: VerdictBase & { id: string; value: (row: Z) => number | Absent }): ReactNode;
  <K extends NumberField<Z>>(props: VerdictBase & { value: K; id?: string }): ReactNode;
}
```
