@umriss-ui/table 0.12.0 → 0.13.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +78 -0
- package/README.md +4 -4
- package/dist/index.d.ts +56 -45
- package/dist/table.css +1 -1
- package/dist/table.js +2097 -2050
- package/docs/llms-full.md +167 -130
- package/package.json +1 -1
package/docs/llms-full.md
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
# @umriss-ui/table 0.
|
|
1
|
+
# @umriss-ui/table 0.13.1
|
|
2
2
|
|
|
3
3
|
> React data table for data-dense applications - sorting, filtering, grouping, aggregates, virtualisation. Declared the way it reads: columns as JSX, typed against their rows.
|
|
4
4
|
|
|
@@ -1172,7 +1172,7 @@ const COLUMNS = [
|
|
|
1172
1172
|
{ id: "latencySlo", label: "Latency objective (ms)" },
|
|
1173
1173
|
] as const;
|
|
1174
1174
|
|
|
1175
|
-
/* Written once for every table of the application. In
|
|
1175
|
+
/* Written once for every table of the application. In server mode the table
|
|
1176
1176
|
holds one page of the server's, and that is all `asCsv` can write - so the
|
|
1177
1177
|
button says so instead of pretending to copy the whole list. */
|
|
1178
1178
|
function CopyAsCsv({ of }: { of: TableRef }) {
|
|
@@ -1184,7 +1184,7 @@ function CopyAsCsv({ of }: { of: TableRef }) {
|
|
|
1184
1184
|
void navigator.clipboard.writeText(of.asCsv()).then(() => setCopied(true));
|
|
1185
1185
|
}}
|
|
1186
1186
|
>
|
|
1187
|
-
{copied ? "Copied" : of.
|
|
1187
|
+
{copied ? "Copied" : of.server ? "Copy this page as CSV" : "Copy as CSV"}
|
|
1188
1188
|
</Button>
|
|
1189
1189
|
);
|
|
1190
1190
|
}
|
|
@@ -1275,13 +1275,13 @@ A value cut short at the edge of its cell shows whole in a tip, under the pointe
|
|
|
1275
1275
|
| `density` | `"regular" \| "compact"` | the density of the `UmrissProvider`, else `"regular"` | How tightly the rows stand.<br>Shown in: [Fit long group names in a compact table (Grouping)](#/grouping/compact-and-long-values), [Employees in the detail (Tree rows)](#/tree-rows/employees-in-the-detail), [Own staff and teams (Tree rows)](#/tree-rows/own-staff-and-teams) and 4 more |
|
|
1276
1276
|
| `maxHeight` | `string` | — | Height of the scroll area, e.g. "480px". A virtualised table needs it.<br>Shown in: [Keep the header and the names in view (Width and pinning)](#/width-and-pinning/sticky-parts), [Fold groups into a summary (Grouping)](#/grouping/the-overview), [Group twenty thousand rows (Grouping)](#/grouping/twenty-thousand-rows) and 3 more |
|
|
1277
1277
|
| `empty` | `ReactNode` | — | What stands in the body when there are no rows. Empty because of a filter the table shows itself – with the way back.<br>Shown in: [Restrict which rows a table has (Pre-filter)](#/pre-filter/pre-filter), [Show loading, empty, failed and no match (Row appearance)](#/row-appearance/states) |
|
|
1278
|
-
| `loading` | `boolean` | — | Shows placeholder rows instead of the rows.<br>Shown in: [Rows from a request (Filter)](#/filter/rows-from-a-request), [Show loading, empty, failed and no match (Row appearance)](#/row-appearance/states), [Show loading, and drop a late answer (
|
|
1278
|
+
| `loading` | `boolean` | — | Shows placeholder rows instead of the rows.<br>Shown in: [Rows from a request (Filter)](#/filter/rows-from-a-request), [Show loading, empty, failed and no match (Row appearance)](#/row-appearance/states), [Show loading, and drop a late answer (Server mode)](#/server-mode/loading-and-late-answers) and 1 more |
|
|
1279
1279
|
| `rowProps` | `(row: Z) => `[`RowAttributes`](#type-RowAttributes) | — | Classes and data attributes per row.<br>Shown in: [Mark rows by their state (Row appearance)](#/row-appearance/styling-rows) |
|
|
1280
1280
|
| `groupable` | `boolean` | — | `false`: the user cannot group this table - the column menu offers no grouping, and a grouping handed in is passed over.<br>Shown in: [Switch grouping off (Grouping)](#/grouping/switched-off) |
|
|
1281
1281
|
| `grid` | `boolean` | — | Grid mode: the table is one tab stop, and the arrows walk its cells - Home and End in the row, Ctrl+Home and Ctrl+End to the table's ends, PageUp and PageDown by the rows in view. A cell's own controls are reached with Enter or F2 and left with Escape; a column with `edit` is edited in place. Without it the table stays a native table.<br>Shown in: [Work cell by cell (Grid mode)](#/grid-mode/grid-mode), [Combine grid mode with groups, pinning and many rows (Grid mode)](#/grid-mode/the-whole-grid), [Edit a comments column (Edits)](#/edits/comments-column) and 6 more |
|
|
1282
1282
|
| `editMode` | `"cell" \| "row"` | — | Grid mode ([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)): `"cell"` reports every cell as it is left (`onCellEdit`); `"row"` opens every cell of a row that edits at once, as one **Row draft**, and reports it only when the row is saved on purpose (`onRowSave`) - by its Save button or Enter; Escape or Discard drops it. A row with a draft is left only by saving or discarding it.<br>Shown in: [Save a row on purpose (Edits)](#/edits/save-a-row-on-purpose), [Check a whole row before it is saved (Edits)](#/edits/check-a-whole-row), [Keep a list: add, change and delete rows (Edits)](#/edits/keep-a-list) and 1 more |
|
|
1283
1283
|
| `newRow` | `() => Partial<Z>` | — | What a new row starts with - the values the columns read before anything is typed. Without it, nothing.<br>Shown in: [Keep a list: add, change and delete rows (Edits)](#/edits/keep-a-list) |
|
|
1284
|
-
| `children` | `ReactNode` | — | Columns, `RowDetail`, `RowActions` and the unbound parts.<br>Shown in: [Show a list of services](#/first-table/first-table), [Search and page from a header of your own](#/first-table/search-and-page-from-a-header-of-your-own), [Sort, arrange and export from controls of your own](#/first-table/sort-arrange-and-export-from-controls-of-your-own) and
|
|
1284
|
+
| `children` | `ReactNode` | — | Columns, `RowDetail`, `RowActions` and the unbound parts.<br>Shown in: [Show a list of services](#/first-table/first-table), [Search and page from a header of your own](#/first-table/search-and-page-from-a-header-of-your-own), [Sort, arrange and export from controls of your own](#/first-table/sort-arrange-and-export-from-controls-of-your-own) and 114 more |
|
|
1285
1285
|
|
|
1286
1286
|
###### Events
|
|
1287
1287
|
|
|
@@ -1296,7 +1296,7 @@ A value cut short at the edge of its cell shows whole in a tip, under the pointe
|
|
|
1296
1296
|
|
|
1297
1297
|
| Prop | Type | Default | Description |
|
|
1298
1298
|
|---|---|---|---|
|
|
1299
|
-
| `ariaLabel` | `string` | — | Accessible name of the table (not of the outer frame).<br>Shown in: [Show a list of services](#/first-table/first-table), [Search and page from a header of your own](#/first-table/search-and-page-from-a-header-of-your-own), [Sort, arrange and export from controls of your own](#/first-table/sort-arrange-and-export-from-controls-of-your-own) and
|
|
1299
|
+
| `ariaLabel` | `string` | — | Accessible name of the table (not of the outer frame).<br>Shown in: [Show a list of services](#/first-table/first-table), [Search and page from a header of your own](#/first-table/search-and-page-from-a-header-of-your-own), [Sort, arrange and export from controls of your own](#/first-table/sort-arrange-and-export-from-controls-of-your-own) and 114 more |
|
|
1300
1300
|
|
|
1301
1301
|
###### Styling
|
|
1302
1302
|
|
|
@@ -1308,17 +1308,23 @@ A value cut short at the edge of its cell shows whole in a tip, under the pointe
|
|
|
1308
1308
|
|
|
1309
1309
|
| Prop | Type | Default | Description |
|
|
1310
1310
|
|---|---|---|---|
|
|
1311
|
-
| `rowKey` *required* | `(row: Z) => string` | — | A stable key per row – the basis of selection and expansion.<br>Shown in: [Show a list of services](#/first-table/first-table), [Search and page from a header of your own](#/first-table/search-and-page-from-a-header-of-your-own), [Sort, arrange and export from controls of your own](#/first-table/sort-arrange-and-export-from-controls-of-your-own) and
|
|
1311
|
+
| `rowKey` *required* | `(row: Z) => string` | — | A stable key per row – the basis of selection and expansion.<br>Shown in: [Show a list of services](#/first-table/first-table), [Search and page from a header of your own](#/first-table/search-and-page-from-a-header-of-your-own), [Sort, arrange and export from controls of your own](#/first-table/sort-arrange-and-export-from-controls-of-your-own) and 114 more |
|
|
1312
1312
|
| `pageSize` | `number` | `10` | How many rows a page holds.<br>Shown in: [Search and page from a header of your own](#/first-table/search-and-page-from-a-header-of-your-own), [Ask a question over several fields (Filter)](#/filter/a-question-over-several-fields), [Restrict which rows a table has (Pre-filter)](#/pre-filter/pre-filter) and 6 more |
|
|
1313
|
-
| `defaultSort` | [`SortLevel`](#type-SortLevel)` \| readonly `[`SortLevel`](#type-SortLevel)`[] \| null` | `null` | The application's sort; it is the default that `view` leaves out.<br>Shown in: [Sort, arrange and export from controls of your own](#/first-table/sort-arrange-and-export-from-controls-of-your-own), [
|
|
1313
|
+
| `defaultSort` | [`SortLevel`](#type-SortLevel)` \| readonly `[`SortLevel`](#type-SortLevel)`[] \| null` | `null` | The application's sort; it is the default that `view` leaves out.<br>Shown in: [Sort, arrange and export from controls of your own](#/first-table/sort-arrange-and-export-from-controls-of-your-own), [A label wider than its column (Width and pinning)](#/width-and-pinning/a-label-wider-than-its-column), [Sort by several columns (Sorting)](#/sorting/sort-by-several-columns) and 9 more |
|
|
1314
1314
|
| `defaultGrouping` | [`GroupingId`](#type-GroupingId)`<Z> \| readonly `[`GroupingId`](#type-GroupingId)`<Z>[]` | ungrouped, until the user groups | The application's grouping: a column or group key, or up to three, the outermost first. It is the default that `view` leaves out.<br>Shown in: [Group by one column (Grouping)](#/grouping/one-level), [Group on two levels (Grouping)](#/grouping/two-levels), [Group on three levels (Grouping)](#/grouping/three-levels) and 22 more |
|
|
1315
1315
|
| `preFilter` | `(row: Z) => boolean` | — | Which rows the table has at all – by permission, by tenant, by anything the user is not meant to undo. It is invisible: never a condition, never reset, never part of the view, and "43 of 1,204" counts only the rows it admits. It may stand in the call; a change leaves the page standing, and the model clamps it.<br>Shown in: [Restrict which rows a table has (Pre-filter)](#/pre-filter/pre-filter) |
|
|
1316
1316
|
| `rowFilters` | `readonly `[`RowFilter`](#/filter/type-RowFilter)`<Z, any>[]` | — | The row filters the table has: conditions the application defines over the whole row and sets with `t.setFilter(filter, condition)` from a control of its own. Named here so that a condition from `initialView`, which arrives by id, is known in the first render.<br>Shown in: [Filter by a field no column shows (Filter)](#/filter/a-field-no-column-shows), [Rows from a request (Filter)](#/filter/rows-from-a-request), [Ask a question over several fields (Filter)](#/filter/a-question-over-several-fields) and 3 more |
|
|
1317
|
-
| `initialView` | [`TableView`](#type-TableView) | — | The view
|
|
1317
|
+
| `initialView` | [`TableView`](#type-TableView) | — | The view to start from, and to go to whenever one differing in content from the last is handed in - the same view again changes nothing, and what it leaves out is reset; one the table reported itself, handed back late, is its own state coming back and not gone to. The table remembers none: where a view is kept is the application's decision. Names no column carries fall out.<br>Shown in: [Ask a question over several fields (Filter)](#/filter/a-question-over-several-fields), [Fold groups into a summary (Grouping)](#/grouping/the-overview), [Show loading, empty, failed and no match (Row appearance)](#/row-appearance/states) and 2 more |
|
|
1318
1318
|
| `virtual` | `boolean \| { overscan?: number }` | — | Renders only what stands in the scroll area; paging is then off. Every row is one row pitch tall, which the table measures itself ([ADR-0042](https://github.com/romanhaendler/umriss-ui/blob/main/docs/adr/0042-a-rows-height-never-follows-what-it-shows.md)).<br>Shown in: [Group twenty thousand rows (Grouping)](#/grouping/twenty-thousand-rows), [Scroll twenty thousand rows (Virtualisation)](#/virtualisation/virtualisation), [Combine grid mode with groups, pinning and many rows (Grid mode)](#/grid-mode/the-whole-grid) |
|
|
1319
1319
|
| `selection` | [`TableSelection`](#type-TableSelection)`<string>` | — | A selection from outside instead of its own – when the application holds it.<br>Shown in: [Hold the selection yourself (Selection)](#/selection/hold-the-selection-yourself) |
|
|
1320
1320
|
| `filter` | `(row: Z) => boolean` | — | *Deprecated* Is called `preFilter` now; the old name goes with the next minor version. The old name of `preFilter` – the same filter, the same meaning. |
|
|
1321
1321
|
|
|
1322
|
+
###### Events
|
|
1323
|
+
|
|
1324
|
+
| Prop | Type | Default | Description |
|
|
1325
|
+
|---|---|---|---|
|
|
1326
|
+
| `onViewChange` | `(view: `[`TableView`](#type-TableView)`) => void` | — | Every change of the view, once, always the whole view - the one to keep, or to hand another table as its `initialView`. Not called for the view the table starts with.<br>Shown in: [Keep and restore a view (View)](#/view/initial-view) |
|
|
1327
|
+
|
|
1322
1328
|
##### `TableSnapshot<Z>`
|
|
1323
1329
|
|
|
1324
1330
|
| Prop | Type | Default | Description |
|
|
@@ -1348,7 +1354,7 @@ A value cut short at the edge of its cell shows whole in a tip, under the pointe
|
|
|
1348
1354
|
| `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.<br>Shown in: [Set a condition from outside the table (Filter)](#/filter/conditions-from-outside) |
|
|
1349
1355
|
| `setFilter` *required* | [`SetFilter`](#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.<br>Shown in: [Set a condition from outside the table (Filter)](#/filter/conditions-from-outside), [Filter by a field no column shows (Filter)](#/filter/a-field-no-column-shows), [Rows from a request (Filter)](#/filter/rows-from-a-request) and 5 more |
|
|
1350
1356
|
| `conditionOf` *required* | `<B>(filter: `[`RowFilter`](#/filter/type-RowFilter)`<Z, B>) => B \| null` | — | The condition of a row filter, as its type - `null` while it is lifted.<br>Shown in: [Filter by a field no column shows (Filter)](#/filter/a-field-no-column-shows), [Rows from a request (Filter)](#/filter/rows-from-a-request), [Ask a question over several fields (Filter)](#/filter/a-question-over-several-fields) and 3 more |
|
|
1351
|
-
| `selection` *required* | [`TableSelection`](#type-TableSelection)`<string>` | — | The selection – its own or the one handed in through `selection`.<br>Shown in: [Select rows (Selection)](#/selection/selection), [Scroll twenty thousand rows (Virtualisation)](#/virtualisation/virtualisation), [Load pages from a server (
|
|
1357
|
+
| `selection` *required* | [`TableSelection`](#type-TableSelection)`<string>` | — | The selection – its own or the one handed in through `selection`.<br>Shown in: [Select rows (Selection)](#/selection/selection), [Scroll twenty thousand rows (Virtualisation)](#/virtualisation/virtualisation), [Load pages from a server (Server mode)](#/server-mode/a-million-rows-on-a-server) and 1 more |
|
|
1352
1358
|
| `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.<br>Shown in: [Group and fold from controls of your own (Grouping)](#/grouping/group-and-fold-from-controls-of-your-own) |
|
|
1353
1359
|
| `setGrouping` *required* | `(grouping: readonly string[]) => void` | — | Groups by these columns or group keys; `[]` ungroups. Back to page one.<br>Shown in: [Group and fold from controls of your own (Grouping)](#/grouping/group-and-fold-from-controls-of-your-own) |
|
|
1354
1360
|
| `folded` *required* | `readonly string[]` | — | The paths of the folded groups that still occur.<br>Shown in: [Group and fold from controls of your own (Grouping)](#/grouping/group-and-fold-from-controls-of-your-own) |
|
|
@@ -1360,10 +1366,10 @@ A value cut short at the edge of its cell shows whole in a tip, under the pointe
|
|
|
1360
1366
|
| `unfoldAllBranches` *required* | `() => void` | — | Tree rows: opens every branch that has children.<br>Shown in: [Open branches from controls of your own (Tree rows)](#/tree-rows/open-branches-from-controls-of-your-own) |
|
|
1361
1367
|
| `foldAllBranches` *required* | `() => void` | — | Tree rows: closes every branch.<br>Shown in: [Open branches from controls of your own (Tree rows)](#/tree-rows/open-branches-from-controls-of-your-own) |
|
|
1362
1368
|
| `view` *required* | [`TableView`](#type-TableView) | — | The part of the state an application can keep; whatever still stands as the options set it up is absent.<br>Shown in: [Set a condition from outside the table (Filter)](#/filter/conditions-from-outside), [Fold groups into a summary (Grouping)](#/grouping/the-overview), [Keep and restore a view (View)](#/view/initial-view) |
|
|
1363
|
-
| `asCsv` *required* | `() => string` | — | The filtered set in the visible columns as text for a spreadsheet - in
|
|
1369
|
+
| `asCsv` *required* | `() => string` | — | The filtered set in the visible columns as text for a spreadsheet - in server mode the page.<br>Shown in: [Sort, arrange and export from controls of your own](#/first-table/sort-arrange-and-export-from-controls-of-your-own) |
|
|
1364
1370
|
| `virtual` *required* | `boolean` | — | Whether it virtualises.<br>Shown in: [Search and page from a header of your own](#/first-table/search-and-page-from-a-header-of-your-own) |
|
|
1365
|
-
| `rowCount` *required* | `number` | — | How many rows the filtered set has - in
|
|
1366
|
-
| `
|
|
1371
|
+
| `rowCount` *required* | `number` | — | How many rows the filtered set has - in server mode the server's count.<br>Shown in: [Search and page from a header of your own](#/first-table/search-and-page-from-a-header-of-your-own) |
|
|
1372
|
+
| `server` *required* | `boolean` | — | Whether it is in server mode: the rows are one page of a server's.<br>Shown in: [Sort, arrange and export from controls of your own](#/first-table/sort-arrange-and-export-from-controls-of-your-own) |
|
|
1367
1373
|
|
|
1368
1374
|
##### Types on this page
|
|
1369
1375
|
|
|
@@ -1422,8 +1428,8 @@ only what the first leaves open.
|
|
|
1422
1428
|
|
|
1423
1429
|
| Prop | Type | Default | Description |
|
|
1424
1430
|
|---|---|---|---|
|
|
1425
|
-
| `column` *required* | `K` | — | <br>Shown in: [Sort, arrange and export from controls of your own](#/first-table/sort-arrange-and-export-from-controls-of-your-own), [
|
|
1426
|
-
| `direction` *required* | [`SortDirection`](#type-SortDirection)<br>`"asc" \| "desc"` | — | <br>Shown in: [Sort, arrange and export from controls of your own](#/first-table/sort-arrange-and-export-from-controls-of-your-own), [
|
|
1431
|
+
| `column` *required* | `K` | — | <br>Shown in: [Sort, arrange and export from controls of your own](#/first-table/sort-arrange-and-export-from-controls-of-your-own), [A label wider than its column (Width and pinning)](#/width-and-pinning/a-label-wider-than-its-column), [Sort by several columns (Sorting)](#/sorting/sort-by-several-columns) and 10 more |
|
|
1432
|
+
| `direction` *required* | [`SortDirection`](#type-SortDirection)<br>`"asc" \| "desc"` | — | <br>Shown in: [Sort, arrange and export from controls of your own](#/first-table/sort-arrange-and-export-from-controls-of-your-own), [A label wider than its column (Width and pinning)](#/width-and-pinning/a-label-wider-than-its-column), [Sort by several columns (Sorting)](#/sorting/sort-by-several-columns) and 10 more |
|
|
1427
1433
|
|
|
1428
1434
|
###### `GroupingId<Z>`
|
|
1429
1435
|
|
|
@@ -1444,11 +1450,11 @@ the application.
|
|
|
1444
1450
|
|
|
1445
1451
|
| Prop | Type | Default | Description |
|
|
1446
1452
|
|---|---|---|---|
|
|
1447
|
-
| `search` | `string` | — | <br>Shown in: [Show loading, empty, failed and no match (Row appearance)](#/row-appearance/states), [Hand the table one page (
|
|
1448
|
-
| `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)](#/filter/a-question-over-several-fields), [A dispatcher's bar (Toolbar controls)](#/toolbar-controls/a-dispatcher-s-bar), [Hand the table one page (
|
|
1449
|
-
| `sort` | `readonly `[`SortLevel`](#type-SortLevel)`<K>[]` | — | <br>Shown in: [Keep and restore a view (View)](#/view/initial-view), [Hand the table one page (
|
|
1450
|
-
| `page` | `number` | — | <br>Shown in: [Hand the table one page (
|
|
1451
|
-
| `pageSize` | `number` | — | <br>Shown in: [Hand the table one page (
|
|
1453
|
+
| `search` | `string` | — | <br>Shown in: [Show loading, empty, failed and no match (Row appearance)](#/row-appearance/states), [Hand the table one page (Server mode)](#/server-mode/only-pages), [Sort and search on the server (Server mode)](#/server-mode/sort-and-search) and 3 more |
|
|
1454
|
+
| `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)](#/filter/a-question-over-several-fields), [A dispatcher's bar (Toolbar controls)](#/toolbar-controls/a-dispatcher-s-bar), [Hand the table one page (Server mode)](#/server-mode/only-pages) and 4 more |
|
|
1455
|
+
| `sort` | `readonly `[`SortLevel`](#type-SortLevel)`<K>[]` | — | <br>Shown in: [Keep and restore a view (View)](#/view/initial-view), [Hand the table one page (Server mode)](#/server-mode/only-pages), [Sort and search on the server (Server mode)](#/server-mode/sort-and-search) and 3 more |
|
|
1456
|
+
| `page` | `number` | — | <br>Shown in: [Hand the table one page (Server mode)](#/server-mode/only-pages), [Sort and search on the server (Server mode)](#/server-mode/sort-and-search), [Name the values a list filter offers (Server mode)](#/server-mode/filter-options) and 2 more |
|
|
1457
|
+
| `pageSize` | `number` | — | <br>Shown in: [Hand the table one page (Server mode)](#/server-mode/only-pages), [Sort and search on the server (Server mode)](#/server-mode/sort-and-search), [Name the values a list filter offers (Server mode)](#/server-mode/filter-options) and 2 more |
|
|
1452
1458
|
| `hidden` | `readonly K[]` | — | <br>Shown in: [Keep and restore a view (View)](#/view/initial-view) |
|
|
1453
1459
|
| `order` | `readonly K[]` | — | |
|
|
1454
1460
|
| `widths` | `Readonly<Record<string, number>>` | — | Column widths the user has dragged, in pixels. |
|
|
@@ -1880,10 +1886,10 @@ The `label` is the column header's text, and so what a screen reader says for ev
|
|
|
1880
1886
|
|
|
1881
1887
|
| Prop | Type | Default | Description |
|
|
1882
1888
|
|---|---|---|---|
|
|
1883
|
-
| `value` *required* | `K` | — | A field of the row. Supplies the column's `id` at the same time.<br>Shown in: [Read a value from a field](#/column/value-from-field), [Compute a value from the row](#/column/computed-value), [Let the value type decide](#/column/defaults) and
|
|
1889
|
+
| `value` *required* | `K` | — | A field of the row. Supplies the column's `id` at the same time.<br>Shown in: [Read a value from a field](#/column/value-from-field), [Compute a value from the row](#/column/computed-value), [Let the value type decide](#/column/defaults) and 114 more |
|
|
1884
1890
|
| `id` | `string` | — | An id of one's own instead of the field name – for two columns over the same field.<br>Shown in: [Pick a standard format (Formats)](#/formats/format), [Share a column between tables (Presets)](#/presets/presets) |
|
|
1885
1891
|
| `format` | [`FormatFor`](#type-FormatFor)`<Z[K]>` | — | A standard presentation by name: `"percent"`, `"count"` or `{ decimals }` for numbers, `"date"`, `"time"` or `"dateTime"` for points in time. Alignment, sorting, export and footer stay with the value.<br>Shown in: [Compute a value from the row](#/column/computed-value), [Set wording and formats once (Provider)](#/provider/provider), [Pick a standard format (Formats)](#/formats/format) and 33 more |
|
|
1886
|
-
| `filter` | [`FilterFor`](#type-FilterFor)`<Z[K]>` | — | A filter in the column header: `"list"` offers the values that occur, `"range"` two bounds (numbers or points in time), a filter from `columnFilter` asks whatever it asks itself. Its condition stands in the table toolbar.<br>Shown in: [Share a column between tables (Presets)](#/presets/presets), [Choose from the values that occur (Filter)](#/filter/list-filter)
|
|
1892
|
+
| `filter` | [`FilterFor`](#type-FilterFor)`<Z[K]>` | — | A filter in the column header: `"list"` offers the values that occur, `"range"` two bounds (numbers or points in time), a filter from `columnFilter` asks whatever it asks itself. Its condition stands in the table toolbar.<br>Shown in: [A label wider than its column (Width and pinning)](#/width-and-pinning/a-label-wider-than-its-column), [Share a column between tables (Presets)](#/presets/presets), [Choose from the values that occur (Filter)](#/filter/list-filter) and 11 more |
|
|
1887
1893
|
| `group` | [`GroupFor`](#type-GroupFor)`<Z[K]>` | — | Groups points in time by `"day"`, `"week"`, `"month"` or `"year"`.<br>Shown in: [Share a column between tables (Presets)](#/presets/presets), [Group dates by month (Grouping)](#/grouping/by-month) |
|
|
1888
1894
|
| `aggregate` | [`AggregateFor`](#type-AggregateFor)`<Z[K], Z>` | — | What the column's values come to: in the footer over the filtered set, in a group's header over its rows. `"sum"`, `"avg"` for numbers; `"min"`, `"max"` for numbers and points in time; `"range"` for points in time; `"count"`, `"distinct"` for every value with a text form - or a function of one's own. Always from the values, never from other aggregates; absent values count towards nothing. Not together with `footer`, its old name. From `AggregateOptions`.<br>Shown in: [Show absent values (Formats)](#/formats/absent-values), [Share a column between tables (Presets)](#/presets/presets), [Keep values between two bounds (Filter)](#/filter/range-filter) and 33 more |
|
|
1889
1895
|
| `share` | `boolean` | — | The share bar in a group's header – the group's share of the filtered set's sum. It stands under the first column with a sum, one per header; `false` passes it on to the next. The share bar under a sum in a group's header. From `AggregateOptions`.<br>Shown in: [Share a column between tables (Presets)](#/presets/presets), [Show each group's share (Aggregate)](#/aggregate/share-bar), [Weight a rate by its rows (Aggregate)](#/aggregate/never-an-average-of-averages) and 2 more |
|
|
@@ -1899,10 +1905,10 @@ Also every prop of `ColumnBase` and `ValuePaths`.
|
|
|
1899
1905
|
|
|
1900
1906
|
| Prop | Type | Default | Description |
|
|
1901
1907
|
|---|---|---|---|
|
|
1902
|
-
| `label` *required* | `string` | — | Names the column in its header, in the column menu and in the header row of the export.<br>Shown in: [Read a value from a field](#/column/value-from-field), [Compute a value from the row](#/column/computed-value), [Let the value type decide](#/column/defaults) and
|
|
1903
|
-
| `rowHeader` | `boolean` | — | This column names the row: row header cells, never hideable, the column `stickyRowHeader` pins, and the name by which the row's selection, expander and actions are read out. At most one per table.<br>Shown in: [Read a value from a field](#/column/value-from-field), [Compute a value from the row](#/column/computed-value), [Let the value type decide](#/column/defaults) and
|
|
1908
|
+
| `label` *required* | `string` | — | Names the column in its header, in the column menu and in the header row of the export.<br>Shown in: [Read a value from a field](#/column/value-from-field), [Compute a value from the row](#/column/computed-value), [Let the value type decide](#/column/defaults) and 114 more |
|
|
1909
|
+
| `rowHeader` | `boolean` | — | This column names the row: row header cells, never hideable, the column `stickyRowHeader` pins, and the name by which the row's selection, expander and actions are read out. At most one per table.<br>Shown in: [Read a value from a field](#/column/value-from-field), [Compute a value from the row](#/column/computed-value), [Let the value type decide](#/column/defaults) and 113 more |
|
|
1904
1910
|
| `numeric` | `boolean` | decided by the first value present | Right-aligned with tabular figures.<br>Shown in: [Share a column between tables (Presets)](#/presets/presets) |
|
|
1905
|
-
| `width` | `number` | the browser's | Initial width in pixels.<br>Shown in: [Fit long values (Formats)](#/formats/long-values), [Fit what does not fit (Formats)](#/formats/values-that-do-not-fit), [Let people set the width (Width and pinning)](#/width-and-pinning/width) and
|
|
1911
|
+
| `width` | `number` | the browser's | Initial width in pixels.<br>Shown in: [Fit long values (Formats)](#/formats/long-values), [Fit what does not fit (Formats)](#/formats/values-that-do-not-fit), [Let people set the width (Width and pinning)](#/width-and-pinning/width) and 14 more |
|
|
1906
1912
|
| `resizable` | `boolean` | — | Shows the drag grip on the header cell.<br>Shown in: [Let people set the width (Width and pinning)](#/width-and-pinning/width), [Pin and size from controls of your own (Width and pinning)](#/width-and-pinning/pin-and-size-from-controls-of-your-own), [Share a column between tables (Presets)](#/presets/presets) and 1 more |
|
|
1907
1913
|
| `pin` | [`Pin`](#type-Pin)<br>`"start" \| "end"` | — | Keeps the column in view while the table scrolls sideways: in a block before every other column, or after them. The user can change it in the column menu; the view carries the change. Pinned blocks take at most half of the width the table shows: on a narrower one the end block, then the start block scrolls with the rest, and sticks again when there is room.<br>Shown in: [Pin columns to both sides (Width and pinning)](#/width-and-pinning/pinned-both-sides), [Share a column between tables (Presets)](#/presets/presets), [Combine grid mode with groups, pinning and many rows (Grid mode)](#/grid-mode/the-whole-grid) and 1 more |
|
|
1908
1914
|
| `sortable` | `boolean` | `true` when the value is text, a number, a point in time or a boolean | Whether the column can be sorted by.<br>Shown in: [Fit long values (Formats)](#/formats/long-values), [Fit what does not fit (Formats)](#/formats/values-that-do-not-fit), [Let people set the width (Width and pinning)](#/width-and-pinning/width) and 6 more |
|
|
@@ -2639,6 +2645,38 @@ export default function PinAndSizeFromControls() {
|
|
|
2639
2645
|
}
|
|
2640
2646
|
```
|
|
2641
2647
|
|
|
2648
|
+
##### A label wider than its column
|
|
2649
|
+
|
|
2650
|
+
A column with a `width` is that wide, whatever its label says. The label ends in an ellipsis; the sort arrow and the filter stay.
|
|
2651
|
+
|
|
2652
|
+
```tsx
|
|
2653
|
+
import { useTable } from "@umriss-ui/table";
|
|
2654
|
+
|
|
2655
|
+
interface Shipment {
|
|
2656
|
+
id: string;
|
|
2657
|
+
weight: number;
|
|
2658
|
+
carrier: string;
|
|
2659
|
+
}
|
|
2660
|
+
|
|
2661
|
+
const SHIPMENTS: Shipment[] = [
|
|
2662
|
+
{ id: "FP-1004210", weight: 12.4, carrier: "Northline" },
|
|
2663
|
+
{ id: "FP-1004223", weight: 3.1, carrier: "Eastway" },
|
|
2664
|
+
{ id: "FP-1004236", weight: 48, carrier: "Northline" },
|
|
2665
|
+
];
|
|
2666
|
+
|
|
2667
|
+
export default function ALabelWiderThanItsColumn() {
|
|
2668
|
+
const { Table, Column } = useTable(SHIPMENTS, { rowKey: (s) => s.id, defaultSort: { column: "weight", direction: "desc" } });
|
|
2669
|
+
|
|
2670
|
+
return (
|
|
2671
|
+
<Table ariaLabel="Shipments in narrow columns">
|
|
2672
|
+
<Column value="id" label="Shipment" rowHeader />
|
|
2673
|
+
<Column value="weight" label="Gross weight in kilograms" width={75} />
|
|
2674
|
+
<Column value="carrier" label="Carrier responsible for delivery" width={75} filter="list" />
|
|
2675
|
+
</Table>
|
|
2676
|
+
);
|
|
2677
|
+
}
|
|
2678
|
+
```
|
|
2679
|
+
|
|
2642
2680
|
#### Keyboard
|
|
2643
2681
|
|
|
2644
2682
|
| Key | Action |
|
|
@@ -2675,6 +2713,7 @@ From `TableOptions` — the full table stands on [First table](#/first-table/typ
|
|
|
2675
2713
|
| Prop | Type | Default | Description |
|
|
2676
2714
|
|---|---|---|---|
|
|
2677
2715
|
| [`rowKey`](#/first-table/TableOptions-rowKey) *required* | `(row: Z) => string` | — | A stable key per row – the basis of selection and expansion. |
|
|
2716
|
+
| [`defaultSort`](#/first-table/TableOptions-defaultSort) | [`SortLevel`](#/first-table/type-SortLevel)` \| readonly `[`SortLevel`](#/first-table/type-SortLevel)`[] \| null` | `null` | The application's sort; it is the default that `view` leaves out. |
|
|
2678
2717
|
|
|
2679
2718
|
From `TableSnapshot` — the full table stands on [First table](#/first-table/type-TableSnapshot).
|
|
2680
2719
|
|
|
@@ -2690,6 +2729,7 @@ From `FieldColumn` — the full table stands on [Column](#/column/type-FieldColu
|
|
|
2690
2729
|
| Prop | Type | Default | Description |
|
|
2691
2730
|
|---|---|---|---|
|
|
2692
2731
|
| [`value`](#/column/FieldColumn-value) *required* | `K` | — | A field of the row. Supplies the column's `id` at the same time. |
|
|
2732
|
+
| [`filter`](#/column/FieldColumn-filter) | [`FilterFor`](#/column/type-FilterFor)`<Z[K]>` | — | A filter in the column header: `"list"` offers the values that occur, `"range"` two bounds (numbers or points in time), a filter from `columnFilter` asks whatever it asks itself. Its condition stands in the table toolbar. |
|
|
2693
2733
|
|
|
2694
2734
|
From `ColumnBase` — the full table stands on [Column](#/column/type-ColumnBase).
|
|
2695
2735
|
|
|
@@ -3110,7 +3150,7 @@ From `ExportProps` — the full table stands on [Export](#/export/type-ExportPro
|
|
|
3110
3150
|
|
|
3111
3151
|
#### Known limits
|
|
3112
3152
|
|
|
3113
|
-
- In [
|
|
3153
|
+
- In [server mode](#/server-mode) the table sorts nothing itself; the sort goes to the server in the request.
|
|
3114
3154
|
|
|
3115
3155
|
What umriss deliberately does not build, and why: [ADR-0032](https://romanhaendler.github.io/umriss-ui/what-umriss-ui-is-not/).
|
|
3116
3156
|
|
|
@@ -3294,7 +3334,7 @@ type TableRef = Omit<TableSnapshot<unknown>, "setFilter" | "conditionOf"> & {
|
|
|
3294
3334
|
|
|
3295
3335
|
#### Known limits
|
|
3296
3336
|
|
|
3297
|
-
- In [
|
|
3337
|
+
- In [server mode](#/server-mode) the table searches nothing itself; the term goes to the server in the request.
|
|
3298
3338
|
|
|
3299
3339
|
What umriss deliberately does not build, and why: [ADR-0032](https://romanhaendler.github.io/umriss-ui/what-umriss-ui-is-not/).
|
|
3300
3340
|
|
|
@@ -4297,7 +4337,7 @@ The keys of [First table](#/first-table/keyboard-first-table), [Popover](https:/
|
|
|
4297
4337
|
|
|
4298
4338
|
| Prop | Type | Default | Description |
|
|
4299
4339
|
|---|---|---|---|
|
|
4300
|
-
| `id` *required* | `string` | — | Its name in `t.view.conditions` and in what
|
|
4340
|
+
| `id` *required* | `string` | — | Its name in `t.view.conditions` and in what server mode reports - the one place the filter is spelled. Not the id of a column of the same table.<br>Shown in: [Filter by a field no column shows](#/filter/a-field-no-column-shows), [Rows from a request](#/filter/rows-from-a-request), [Ask a question over several fields](#/filter/a-question-over-several-fields) and 3 more |
|
|
4301
4341
|
| `label` *required* | `string` | — | What it is called: before the text of its chip, and in the chip's accessible names.<br>Shown in: [Filter by a field no column shows](#/filter/a-field-no-column-shows), [Rows from a request](#/filter/rows-from-a-request), [Ask a question over several fields](#/filter/a-question-over-several-fields) and 3 more |
|
|
4302
4342
|
| `matches` *required* | `(row: Z, condition: B) => boolean` | — | Whether the row satisfies the condition. Any question over the whole row; whatever varies belongs in the condition - the table cannot see a change in a closure.<br>Shown in: [Filter by a field no column shows](#/filter/a-field-no-column-shows), [Rows from a request](#/filter/rows-from-a-request), [Ask a question over several fields](#/filter/a-question-over-several-fields) and 3 more |
|
|
4303
4343
|
| `describe` | `(condition: B) => string` | — | The text of the condition in the table toolbar, behind the label. Without it the condition has no chip: the application's control shows it.<br>Shown in: [Ask a question over several fields](#/filter/a-question-over-several-fields), [A dispatcher's bar (Toolbar controls)](#/toolbar-controls/a-dispatcher-s-bar) |
|
|
@@ -4323,7 +4363,7 @@ type Absent = null | undefined;
|
|
|
4323
4363
|
#### Known limits
|
|
4324
4364
|
|
|
4325
4365
|
- No text filter per column: the search covers text.
|
|
4326
|
-
- In [
|
|
4366
|
+
- In [server mode](#/server-mode) a list filter offers what the application names; the table cannot count values it does not hold.
|
|
4327
4367
|
|
|
4328
4368
|
What umriss deliberately does not build, and why: [ADR-0032](https://romanhaendler.github.io/umriss-ui/what-umriss-ui-is-not/).
|
|
4329
4369
|
|
|
@@ -5619,7 +5659,7 @@ export default function GroupAndFoldFromControls() {
|
|
|
5619
5659
|
|
|
5620
5660
|
- No pivot and no more than three levels ([ADR-0032](https://romanhaendler.github.io/umriss-ui/what-umriss-ui-is-not/)).
|
|
5621
5661
|
- No bar to drag headers onto: grouping is chosen in the column menu.
|
|
5622
|
-
- No groups in [
|
|
5662
|
+
- No groups in [server mode](#/server-mode): they would be made of one page.
|
|
5623
5663
|
|
|
5624
5664
|
What umriss deliberately does not build, and why: [ADR-0032](https://romanhaendler.github.io/umriss-ui/what-umriss-ui-is-not/).
|
|
5625
5665
|
|
|
@@ -6225,7 +6265,7 @@ From `ToolbarProps` — the full table stands on [Toolbar](#/toolbar/type-Toolba
|
|
|
6225
6265
|
#### Known limits
|
|
6226
6266
|
|
|
6227
6267
|
- Not with grouping or pagination: both would build or cut levels a second way. A large tree uses virtualisation.
|
|
6228
|
-
- Not in [
|
|
6268
|
+
- Not in [server mode](#/server-mode), and no branches loaded on demand yet.
|
|
6229
6269
|
- One column set for every level; a level without a value shows it as absent.
|
|
6230
6270
|
|
|
6231
6271
|
What umriss deliberately does not build, and why: [ADR-0032](https://romanhaendler.github.io/umriss-ui/what-umriss-ui-is-not/).
|
|
@@ -6667,7 +6707,7 @@ type Displayable = string | number | boolean | Date;
|
|
|
6667
6707
|
|
|
6668
6708
|
#### Known limits
|
|
6669
6709
|
|
|
6670
|
-
- No footer in [
|
|
6710
|
+
- No footer in [server mode](#/server-mode): a sum over one page would misstate the server's set.
|
|
6671
6711
|
|
|
6672
6712
|
What umriss deliberately does not build, and why: [ADR-0032](https://romanhaendler.github.io/umriss-ui/what-umriss-ui-is-not/).
|
|
6673
6713
|
|
|
@@ -6851,7 +6891,7 @@ From `ToolbarProps` — the full table stands on [Toolbar](#/toolbar/type-Toolba
|
|
|
6851
6891
|
|
|
6852
6892
|
#### Known limits
|
|
6853
6893
|
|
|
6854
|
-
- In [
|
|
6894
|
+
- In [server mode](#/server-mode) “select all” selects the page the table holds.
|
|
6855
6895
|
|
|
6856
6896
|
What umriss deliberately does not build, and why: [ADR-0032](https://romanhaendler.github.io/umriss-ui/what-umriss-ui-is-not/).
|
|
6857
6897
|
|
|
@@ -7111,7 +7151,7 @@ From `TableOptions` — the full table stands on [First table](#/first-table/typ
|
|
|
7111
7151
|
| Prop | Type | Default | Description |
|
|
7112
7152
|
|---|---|---|---|
|
|
7113
7153
|
| [`rowKey`](#/first-table/TableOptions-rowKey) *required* | `(row: Z) => string` | — | A stable key per row – the basis of selection and expansion. |
|
|
7114
|
-
| [`initialView`](#/first-table/TableOptions-initialView) | [`TableView`](#/first-table/type-TableView) | — | The view
|
|
7154
|
+
| [`initialView`](#/first-table/TableOptions-initialView) | [`TableView`](#/first-table/type-TableView) | — | The view to start from, and to go to whenever one differing in content from the last is handed in - the same view again changes nothing, and what it leaves out is reset; one the table reported itself, handed back late, is its own state coming back and not gone to. The table remembers none: where a view is kept is the application's decision. Names no column carries fall out. |
|
|
7115
7155
|
|
|
7116
7156
|
From `FieldColumn` — the full table stands on [Column](#/column/type-FieldColumn).
|
|
7117
7157
|
|
|
@@ -8601,7 +8641,7 @@ The keys of [First table](#/first-table/keyboard-first-table), [Input](https://r
|
|
|
8601
8641
|
|
|
8602
8642
|
| Prop | Type | Default | Description |
|
|
8603
8643
|
|---|---|---|---|
|
|
8604
|
-
| `id` *required* | `string` | — | Its name in `t.view.conditions` and in what
|
|
8644
|
+
| `id` *required* | `string` | — | Its name in `t.view.conditions` and in what server mode reports - the one place the filter is spelled. Not the id of a column of the same table.<br>Shown in: [Controls of your own at the toolbar's size](#/toolbar-controls/controls-at-the-toolbars-size), [A larger toolbar](#/toolbar-controls/a-larger-toolbar), [A dispatcher's bar](#/toolbar-controls/a-dispatcher-s-bar) and 3 more |
|
|
8605
8645
|
| `label` *required* | `string` | — | What it is called: before the text of its chip, and in the chip's accessible names.<br>Shown in: [Controls of your own at the toolbar's size](#/toolbar-controls/controls-at-the-toolbars-size), [A larger toolbar](#/toolbar-controls/a-larger-toolbar), [A dispatcher's bar](#/toolbar-controls/a-dispatcher-s-bar) and 3 more |
|
|
8606
8646
|
| `matches` *required* | `(row: Z, condition: B) => boolean` | — | Whether the row satisfies the condition. Any question over the whole row; whatever varies belongs in the condition - the table cannot see a change in a closure.<br>Shown in: [Controls of your own at the toolbar's size](#/toolbar-controls/controls-at-the-toolbars-size), [A larger toolbar](#/toolbar-controls/a-larger-toolbar), [A dispatcher's bar](#/toolbar-controls/a-dispatcher-s-bar) and 3 more |
|
|
8607
8647
|
| `describe` | `(condition: B) => string` | — | The text of the condition in the table toolbar, behind the label. Without it the condition has no chip: the application's control shows it.<br>Shown in: [A dispatcher's bar](#/toolbar-controls/a-dispatcher-s-bar), [Ask a question over several fields (Filter)](#/filter/a-question-over-several-fields) |
|
|
@@ -8774,7 +8814,7 @@ Demo page: https://romanhaendler.github.io/umriss-ui/table/export/
|
|
|
8774
8814
|
|
|
8775
8815
|
It writes the filtered set across all pages, in the visible columns, in the order and sorting on screen – and the values, not their presentation: numbers with a decimal comma, a point in time as a timestamp, an absent value as an empty field. Fields are separated by semicolons, and a byte order mark tells the spreadsheet it is UTF-8.
|
|
8776
8816
|
|
|
8777
|
-
A verdict column exports its value, not the verdict. In [
|
|
8817
|
+
A verdict column exports its value, not the verdict. In [server mode](#/server-mode) the table holds one page of the server's, so it exports that page, and the button says so. The same text is `t.asCsv()`, without a button.
|
|
8778
8818
|
|
|
8779
8819
|
#### Examples
|
|
8780
8820
|
|
|
@@ -8919,13 +8959,13 @@ import { useTable } from "@umriss-ui/table";
|
|
|
8919
8959
|
|
|
8920
8960
|
Demo page: https://romanhaendler.github.io/umriss-ui/table/view/
|
|
8921
8961
|
|
|
8922
|
-
The table remembers nothing, not in the address and not in any storage. Everything stands in `t.view
|
|
8962
|
+
The table remembers nothing, not in the address and not in any storage. Everything stands in `t.view`, and `onViewChange` reports every change of it; keep it where the application keeps things and hand it back through `initialView`. A view that differs from the last one handed in applies at once, the same one again changes nothing - two tables stay in step by handing each other what they report.
|
|
8923
8963
|
|
|
8924
8964
|
#### Examples
|
|
8925
8965
|
|
|
8926
8966
|
##### Keep and restore a view
|
|
8927
8967
|
|
|
8928
|
-
`
|
|
8968
|
+
`onViewChange` reports search, sort, hidden columns and widths as one view; hand one back through `initialView` and the table goes to it, no `key` needed. Sort, hide, drag a width, then restore.
|
|
8929
8969
|
|
|
8930
8970
|
```tsx
|
|
8931
8971
|
import { useState } from "react";
|
|
@@ -8952,8 +8992,12 @@ const INVOICES: Invoice[] = [
|
|
|
8952
8992
|
{ id: "INV-26-0302", supplier: "Fenwright Legal", costCentre: "Finance", amount: 3770 },
|
|
8953
8993
|
];
|
|
8954
8994
|
|
|
8955
|
-
|
|
8956
|
-
|
|
8995
|
+
export default function InitialView() {
|
|
8996
|
+
/* The application keeps the view the table reports; handing it another one
|
|
8997
|
+
is all it takes to restore. */
|
|
8998
|
+
const [view, setView] = useState(START_VIEW);
|
|
8999
|
+
const [kept, setKept] = useState<TableView | null>(null);
|
|
9000
|
+
const t = useTable(INVOICES, { rowKey: (i) => i.id, initialView: view, onViewChange: setView });
|
|
8957
9001
|
const { Table, Column } = t;
|
|
8958
9002
|
|
|
8959
9003
|
return (
|
|
@@ -8978,32 +9022,19 @@ function InvoiceList({ start, restart }: { start: TableView; restart: (view: Tab
|
|
|
8978
9022
|
</Text>
|
|
8979
9023
|
</Stack>
|
|
8980
9024
|
<Stack direction="row" gap={2} wrap>
|
|
8981
|
-
<Button size="sm" onClick={() =>
|
|
8982
|
-
|
|
9025
|
+
<Button size="sm" onClick={() => setKept(view)}>
|
|
9026
|
+
Keep this view
|
|
9027
|
+
</Button>
|
|
9028
|
+
<Button size="sm" variant="ghost" disabled={kept === null} onClick={() => kept && setView(kept)}>
|
|
9029
|
+
Restore the kept view
|
|
8983
9030
|
</Button>
|
|
8984
|
-
<Button size="sm" variant="ghost" onClick={() =>
|
|
9031
|
+
<Button size="sm" variant="ghost" onClick={() => setView(START_VIEW)}>
|
|
8985
9032
|
Back to the beginning
|
|
8986
9033
|
</Button>
|
|
8987
9034
|
</Stack>
|
|
8988
9035
|
</Stack>
|
|
8989
9036
|
);
|
|
8990
9037
|
}
|
|
8991
|
-
|
|
8992
|
-
export default function InitialView() {
|
|
8993
|
-
const [start, setStart] = useState(START_VIEW);
|
|
8994
|
-
const [generation, setGeneration] = useState(0);
|
|
8995
|
-
|
|
8996
|
-
return (
|
|
8997
|
-
<InvoiceList
|
|
8998
|
-
key={generation}
|
|
8999
|
-
start={start}
|
|
9000
|
-
restart={(view) => {
|
|
9001
|
-
setStart(view);
|
|
9002
|
-
setGeneration((n) => n + 1);
|
|
9003
|
-
}}
|
|
9004
|
-
/>
|
|
9005
|
-
);
|
|
9006
|
-
}
|
|
9007
9038
|
```
|
|
9008
9039
|
|
|
9009
9040
|
#### Keyboard
|
|
@@ -9029,7 +9060,13 @@ From `TableOptions` — the full table stands on [First table](#/first-table/typ
|
|
|
9029
9060
|
| Prop | Type | Default | Description |
|
|
9030
9061
|
|---|---|---|---|
|
|
9031
9062
|
| [`rowKey`](#/first-table/TableOptions-rowKey) *required* | `(row: Z) => string` | — | A stable key per row – the basis of selection and expansion. |
|
|
9032
|
-
| [`initialView`](#/first-table/TableOptions-initialView) | [`TableView`](#/first-table/type-TableView) | — | The view
|
|
9063
|
+
| [`initialView`](#/first-table/TableOptions-initialView) | [`TableView`](#/first-table/type-TableView) | — | The view to start from, and to go to whenever one differing in content from the last is handed in - the same view again changes nothing, and what it leaves out is reset; one the table reported itself, handed back late, is its own state coming back and not gone to. The table remembers none: where a view is kept is the application's decision. Names no column carries fall out. |
|
|
9064
|
+
|
|
9065
|
+
###### Events
|
|
9066
|
+
|
|
9067
|
+
| Prop | Type | Default | Description |
|
|
9068
|
+
|---|---|---|---|
|
|
9069
|
+
| [`onViewChange`](#/first-table/TableOptions-onViewChange) | `(view: `[`TableView`](#/first-table/type-TableView)`) => void` | — | Every change of the view, once, always the whole view - the one to keep, or to hand another table as its `initialView`. Not called for the view the table starts with. |
|
|
9033
9070
|
|
|
9034
9071
|
From `TableSnapshot` — the full table stands on [First table](#/first-table/type-TableSnapshot).
|
|
9035
9072
|
|
|
@@ -9327,7 +9364,7 @@ type TableRef = Omit<TableSnapshot<unknown>, "setFilter" | "conditionOf"> & {
|
|
|
9327
9364
|
|
|
9328
9365
|
#### Known limits
|
|
9329
9366
|
|
|
9330
|
-
- In [
|
|
9367
|
+
- In [server mode](#/server-mode) the page goes to the server in the request, and `rowCount` decides how many pages there are.
|
|
9331
9368
|
|
|
9332
9369
|
What umriss deliberately does not build, and why: [ADR-0032](https://romanhaendler.github.io/umriss-ui/what-umriss-ui-is-not/).
|
|
9333
9370
|
|
|
@@ -9516,11 +9553,11 @@ From `ToolbarProps` — the full table stands on [Toolbar](#/toolbar/type-Toolba
|
|
|
9516
9553
|
#### Known limits
|
|
9517
9554
|
|
|
9518
9555
|
- Paging and virtualisation do not combine; one table does one or the other.
|
|
9519
|
-
- No loading more rows while scrolling: a table on a server pages ([
|
|
9556
|
+
- No loading more rows while scrolling: a table on a server pages ([Server mode](#/server-mode)).
|
|
9520
9557
|
|
|
9521
9558
|
What umriss deliberately does not build, and why: [ADR-0032](https://romanhaendler.github.io/umriss-ui/what-umriss-ui-is-not/).
|
|
9522
9559
|
|
|
9523
|
-
###
|
|
9560
|
+
### Server mode
|
|
9524
9561
|
|
|
9525
9562
|
A table over rows a server holds: the application hands in one page and the server's count, and the table reports what to fetch next (also called server-side paging, sorting and filtering).
|
|
9526
9563
|
|
|
@@ -9528,9 +9565,9 @@ A table over rows a server holds: the application hands in one page and the serv
|
|
|
9528
9565
|
import { useTable } from "@umriss-ui/table";
|
|
9529
9566
|
```
|
|
9530
9567
|
|
|
9531
|
-
Demo page: https://romanhaendler.github.io/umriss-ui/table/
|
|
9568
|
+
Demo page: https://romanhaendler.github.io/umriss-ui/table/server-mode/
|
|
9532
9569
|
|
|
9533
|
-
`
|
|
9570
|
+
`onRequest` reports the request whenever what decides the rows changes – search, conditions, sort, page, page size – complete, defaults included, since a server has no default of the table's.
|
|
9534
9571
|
|
|
9535
9572
|
Requests are the application's: the table shows whatever rows it is given, so an answer to a view the user has already left is the application's to drop.
|
|
9536
9573
|
|
|
@@ -9538,12 +9575,12 @@ Requests are the application's: the table shows whatever rows it is given, so an
|
|
|
9538
9575
|
|
|
9539
9576
|
##### Hand the table one page
|
|
9540
9577
|
|
|
9541
|
-
`
|
|
9578
|
+
`server` takes the rows of one page and the server's `rowCount`; `onRequest` reports the page the user asks for next.
|
|
9542
9579
|
|
|
9543
9580
|
```tsx
|
|
9544
9581
|
import { useState } from "react";
|
|
9545
9582
|
import { Pagination, useTable } from "@umriss-ui/table";
|
|
9546
|
-
import type {
|
|
9583
|
+
import type { TableRequest } from "@umriss-ui/table";
|
|
9547
9584
|
|
|
9548
9585
|
/* Data from the logistics world, written out here so the example runs on its own. */
|
|
9549
9586
|
/** A small LCG - the same numbers on every computer. */
|
|
@@ -9698,7 +9735,7 @@ const SHIPMENTS: readonly Shipment[] = TOURS.flatMap((one) =>
|
|
|
9698
9735
|
);
|
|
9699
9736
|
|
|
9700
9737
|
/* The server is a slice of an array here; in an application it is a request. */
|
|
9701
|
-
const serve = (view:
|
|
9738
|
+
const serve = (view: TableRequest) => {
|
|
9702
9739
|
const start = (view.page - 1) * view.pageSize;
|
|
9703
9740
|
return { rows: SHIPMENTS.slice(start, start + view.pageSize), rowCount: SHIPMENTS.length };
|
|
9704
9741
|
};
|
|
@@ -9707,9 +9744,9 @@ export default function OnlyPages() {
|
|
|
9707
9744
|
const [answer, setAnswer] = useState(() => serve({ search: "", conditions: {}, sort: [], page: 1, pageSize: 10 }));
|
|
9708
9745
|
const { Table, Column } = useTable(answer.rows, {
|
|
9709
9746
|
rowKey: (s) => s.id,
|
|
9710
|
-
|
|
9747
|
+
server: true,
|
|
9711
9748
|
rowCount: answer.rowCount,
|
|
9712
|
-
|
|
9749
|
+
onRequest: (view) => setAnswer(serve(view)),
|
|
9713
9750
|
});
|
|
9714
9751
|
|
|
9715
9752
|
return (
|
|
@@ -9725,13 +9762,13 @@ export default function OnlyPages() {
|
|
|
9725
9762
|
|
|
9726
9763
|
##### Sort and search on the server
|
|
9727
9764
|
|
|
9728
|
-
The
|
|
9765
|
+
The request `onRequest` reports is complete: search, sort, page and page size, defaults included. The line below shows what the server received.
|
|
9729
9766
|
|
|
9730
9767
|
```tsx
|
|
9731
9768
|
import { useState } from "react";
|
|
9732
9769
|
import { Stack, Text } from "@umriss-ui/core";
|
|
9733
9770
|
import { Pagination, Search, Toolbar, useTable } from "@umriss-ui/table";
|
|
9734
|
-
import type {
|
|
9771
|
+
import type { TableRequest } from "@umriss-ui/table";
|
|
9735
9772
|
|
|
9736
9773
|
/* Data from the logistics world, written out here so the example runs on its own. */
|
|
9737
9774
|
/** A small LCG - the same numbers on every computer. */
|
|
@@ -9885,7 +9922,7 @@ const SHIPMENTS: readonly Shipment[] = TOURS.flatMap((one) =>
|
|
|
9885
9922
|
}),
|
|
9886
9923
|
);
|
|
9887
9924
|
|
|
9888
|
-
const serve = (view:
|
|
9925
|
+
const serve = (view: TableRequest) => {
|
|
9889
9926
|
const term = view.search.trim().toLowerCase();
|
|
9890
9927
|
const hits = SHIPMENTS.filter((s) => !term || s.id.toLowerCase().includes(term) || s.customer.toLowerCase().includes(term));
|
|
9891
9928
|
const sort = view.sort[0];
|
|
@@ -9898,16 +9935,16 @@ const serve = (view: ManualView) => {
|
|
|
9898
9935
|
return { view, rows: hits.slice(start, start + view.pageSize), rowCount: hits.length };
|
|
9899
9936
|
};
|
|
9900
9937
|
|
|
9901
|
-
const FIRST:
|
|
9938
|
+
const FIRST: TableRequest = { search: "", conditions: {}, sort: [{ column: "id", direction: "asc" }], page: 1, pageSize: 10 };
|
|
9902
9939
|
|
|
9903
9940
|
export default function SortAndSearch() {
|
|
9904
9941
|
const [answer, setAnswer] = useState(() => serve(FIRST));
|
|
9905
9942
|
const { Table, Column } = useTable(answer.rows, {
|
|
9906
9943
|
rowKey: (s) => s.id,
|
|
9907
9944
|
defaultSort: FIRST.sort[0],
|
|
9908
|
-
|
|
9945
|
+
server: true,
|
|
9909
9946
|
rowCount: answer.rowCount,
|
|
9910
|
-
|
|
9947
|
+
onRequest: (view) => setAnswer(serve(view)),
|
|
9911
9948
|
});
|
|
9912
9949
|
const { search, sort, page, pageSize } = answer.view;
|
|
9913
9950
|
|
|
@@ -9938,7 +9975,7 @@ The table holds one page and cannot count the values of the rest; `filterOptions
|
|
|
9938
9975
|
```tsx
|
|
9939
9976
|
import { useState } from "react";
|
|
9940
9977
|
import { Pagination, useTable } from "@umriss-ui/table";
|
|
9941
|
-
import type {
|
|
9978
|
+
import type { TableRequest } from "@umriss-ui/table";
|
|
9942
9979
|
|
|
9943
9980
|
/* Data from the logistics world, written out here so the example runs on its own. */
|
|
9944
9981
|
/** A small LCG - the same numbers on every computer. */
|
|
@@ -10094,7 +10131,7 @@ const SHIPMENTS: readonly Shipment[] = TOURS.flatMap((one) =>
|
|
|
10094
10131
|
|
|
10095
10132
|
const STATUSES = ["delivered", "out for delivery", "failed attempt"] as const;
|
|
10096
10133
|
|
|
10097
|
-
const serve = (view:
|
|
10134
|
+
const serve = (view: TableRequest) => {
|
|
10098
10135
|
const chosen = view.conditions.status as readonly string[] | undefined;
|
|
10099
10136
|
const hits = SHIPMENTS.filter((s) => !chosen || chosen.includes(s.status));
|
|
10100
10137
|
const start = (view.page - 1) * view.pageSize;
|
|
@@ -10105,9 +10142,9 @@ export default function ListFilter() {
|
|
|
10105
10142
|
const [answer, setAnswer] = useState(() => serve({ search: "", conditions: {}, sort: [], page: 1, pageSize: 10 }));
|
|
10106
10143
|
const { Table, Column } = useTable(answer.rows, {
|
|
10107
10144
|
rowKey: (s) => s.id,
|
|
10108
|
-
|
|
10145
|
+
server: true,
|
|
10109
10146
|
rowCount: answer.rowCount,
|
|
10110
|
-
|
|
10147
|
+
onRequest: (view) => setAnswer(serve(view)),
|
|
10111
10148
|
filterOptions: (column) => (column === "status" ? STATUSES : []),
|
|
10112
10149
|
});
|
|
10113
10150
|
|
|
@@ -10129,7 +10166,7 @@ export default function ListFilter() {
|
|
|
10129
10166
|
```tsx
|
|
10130
10167
|
import { useRef, useState } from "react";
|
|
10131
10168
|
import { Pagination, useTable } from "@umriss-ui/table";
|
|
10132
|
-
import type {
|
|
10169
|
+
import type { TableRequest } from "@umriss-ui/table";
|
|
10133
10170
|
|
|
10134
10171
|
/* Data from the logistics world, written out here so the example runs on its own. */
|
|
10135
10172
|
/** A small LCG - the same numbers on every computer. */
|
|
@@ -10286,7 +10323,7 @@ const SHIPMENTS: readonly Shipment[] = TOURS.flatMap((one) =>
|
|
|
10286
10323
|
/* Every answer takes 600 ms. Page on quickly: only the last request lands. */
|
|
10287
10324
|
const LATENCY = 600;
|
|
10288
10325
|
|
|
10289
|
-
const serve = (view:
|
|
10326
|
+
const serve = (view: TableRequest) => {
|
|
10290
10327
|
const start = (view.page - 1) * view.pageSize;
|
|
10291
10328
|
return { rows: SHIPMENTS.slice(start, start + view.pageSize), rowCount: SHIPMENTS.length };
|
|
10292
10329
|
};
|
|
@@ -10294,13 +10331,13 @@ const serve = (view: ManualView) => {
|
|
|
10294
10331
|
export default function LoadingAndLateAnswers() {
|
|
10295
10332
|
const [answer, setAnswer] = useState(() => serve({ search: "", conditions: {}, sort: [], page: 1, pageSize: 10 }));
|
|
10296
10333
|
const [loading, setLoading] = useState(false);
|
|
10297
|
-
const latest = useRef<
|
|
10334
|
+
const latest = useRef<TableRequest | null>(null);
|
|
10298
10335
|
|
|
10299
10336
|
const { Table, Column } = useTable(answer.rows, {
|
|
10300
10337
|
rowKey: (s) => s.id,
|
|
10301
|
-
|
|
10338
|
+
server: true,
|
|
10302
10339
|
rowCount: answer.rowCount,
|
|
10303
|
-
|
|
10340
|
+
onRequest: (view) => {
|
|
10304
10341
|
latest.current = view;
|
|
10305
10342
|
setLoading(true);
|
|
10306
10343
|
setTimeout(() => {
|
|
@@ -10324,13 +10361,13 @@ export default function LoadingAndLateAnswers() {
|
|
|
10324
10361
|
|
|
10325
10362
|
##### Load pages from a server
|
|
10326
10363
|
|
|
10327
|
-
`
|
|
10364
|
+
`server` hands the table one page and the server's `rowCount`; `onRequest` reports search, conditions, sort and page to fetch the next.
|
|
10328
10365
|
|
|
10329
10366
|
```tsx
|
|
10330
10367
|
import { useRef, useState } from "react";
|
|
10331
10368
|
import { Stack, Text } from "@umriss-ui/core";
|
|
10332
10369
|
import { ColumnMenu, Export, Pagination, Search, Toolbar, useTable } from "@umriss-ui/table";
|
|
10333
|
-
import type {
|
|
10370
|
+
import type { TableRequest } from "@umriss-ui/table";
|
|
10334
10371
|
|
|
10335
10372
|
/* The server below is a fake: a million requests computed from their index,
|
|
10336
10373
|
every answer delayed by 400 ms. Dropping a late answer to an older view is
|
|
@@ -10363,7 +10400,7 @@ const request = (i: number): Request => ({
|
|
|
10363
10400
|
the way a database keeps an index warm. */
|
|
10364
10401
|
let warm: { key: string; order: Int32Array | null } = { key: "", order: null };
|
|
10365
10402
|
|
|
10366
|
-
function serve(view:
|
|
10403
|
+
function serve(view: TableRequest): { rows: Request[]; rowCount: number } {
|
|
10367
10404
|
const search = view.search.trim().toLowerCase();
|
|
10368
10405
|
const services = view.conditions.service as readonly string[] | undefined;
|
|
10369
10406
|
const sort = view.sort[0] ?? BY_ID;
|
|
@@ -10399,8 +10436,8 @@ function serve(view: ManualView): { rows: Request[]; rowCount: number } {
|
|
|
10399
10436
|
return { rows, rowCount };
|
|
10400
10437
|
}
|
|
10401
10438
|
|
|
10402
|
-
const FIRST:
|
|
10403
|
-
const same = (a:
|
|
10439
|
+
const FIRST: TableRequest = { search: "", conditions: {}, sort: [BY_ID], page: 1, pageSize: 10 };
|
|
10440
|
+
const same = (a: TableRequest, b: TableRequest) =>
|
|
10404
10441
|
JSON.stringify([a.search, a.conditions, a.sort, a.page, a.pageSize]) ===
|
|
10405
10442
|
JSON.stringify([b.search, b.conditions, b.sort, b.page, b.pageSize]);
|
|
10406
10443
|
|
|
@@ -10413,9 +10450,9 @@ export default function AMillionRowsOnAServer() {
|
|
|
10413
10450
|
const t = useTable(answer.rows, {
|
|
10414
10451
|
rowKey: (r) => r.id,
|
|
10415
10452
|
defaultSort: BY_ID,
|
|
10416
|
-
|
|
10453
|
+
server: true,
|
|
10417
10454
|
rowCount: answer.rowCount,
|
|
10418
|
-
|
|
10455
|
+
onRequest: (view) => {
|
|
10419
10456
|
latest.current = view;
|
|
10420
10457
|
/* Back to the view on screen before its successor was answered: the
|
|
10421
10458
|
pending answer is dropped, so nothing is loading any more. */
|
|
@@ -11969,31 +12006,31 @@ Used on [Scenarios](#/) and [AlarmList](#/alarmlist).
|
|
|
11969
12006
|
|
|
11970
12007
|
[ColumnMenu](#/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.
|
|
11971
12008
|
|
|
11972
|
-
Used on [Scenarios](#/), [Provider](#/provider), [Column](#/column), [Width and pinning](#/width-and-pinning), [Grouping](#/grouping), [Tree rows](#/tree-rows), [Toolbar](#/toolbar), [Toolbar controls](#/toolbar-controls), [ColumnMenu](#/columnmenu), [View](#/view) and [
|
|
12009
|
+
Used on [Scenarios](#/), [Provider](#/provider), [Column](#/column), [Width and pinning](#/width-and-pinning), [Grouping](#/grouping), [Tree rows](#/tree-rows), [Toolbar](#/toolbar), [Toolbar controls](#/toolbar-controls), [ColumnMenu](#/columnmenu), [View](#/view) and [Server mode](#/server-mode).
|
|
11973
12010
|
|
|
11974
12011
|
##### `Export`
|
|
11975
12012
|
|
|
11976
12013
|
[Export](#/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.
|
|
11977
12014
|
|
|
11978
|
-
Used on [Scenarios](#/), [Provider](#/provider), [Sorting](#/sorting), [Grouping](#/grouping), [Toolbar](#/toolbar), [Toolbar controls](#/toolbar-controls), [Export](#/export) and [
|
|
12015
|
+
Used on [Scenarios](#/), [Provider](#/provider), [Sorting](#/sorting), [Grouping](#/grouping), [Toolbar](#/toolbar), [Toolbar controls](#/toolbar-controls), [Export](#/export) and [Server mode](#/server-mode).
|
|
11979
12016
|
|
|
11980
12017
|
##### `Pagination`
|
|
11981
12018
|
|
|
11982
12019
|
[Pagination](#/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.
|
|
11983
12020
|
|
|
11984
|
-
Used on [Scenarios](#/), [First table](#/first-table), [Filter](#/filter), [Pre-filter](#/pre-filter), [Grouping](#/grouping), [Toolbar](#/toolbar), [Toolbar controls](#/toolbar-controls), [Pagination](#/pagination) and [
|
|
12021
|
+
Used on [Scenarios](#/), [First table](#/first-table), [Filter](#/filter), [Pre-filter](#/pre-filter), [Grouping](#/grouping), [Toolbar](#/toolbar), [Toolbar controls](#/toolbar-controls), [Pagination](#/pagination) and [Server mode](#/server-mode).
|
|
11985
12022
|
|
|
11986
12023
|
##### `Search`
|
|
11987
12024
|
|
|
11988
12025
|
[Search](#/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.
|
|
11989
12026
|
|
|
11990
|
-
Used on [Scenarios](#/), [First table](#/first-table), [Provider](#/provider), [Formats](#/formats), [Sorting](#/sorting), [Search](#/search), [Filter](#/filter), [Pre-filter](#/pre-filter), [Grouping](#/grouping), [Tree rows](#/tree-rows), [Aggregate](#/aggregate), [Selection](#/selection), [Row appearance](#/row-appearance), [RowDetail](#/rowdetail), [Toolbar](#/toolbar), [Toolbar controls](#/toolbar-controls), [Export](#/export), [View](#/view), [Pagination](#/pagination), [Virtualisation](#/virtualisation), [
|
|
12027
|
+
Used on [Scenarios](#/), [First table](#/first-table), [Provider](#/provider), [Formats](#/formats), [Sorting](#/sorting), [Search](#/search), [Filter](#/filter), [Pre-filter](#/pre-filter), [Grouping](#/grouping), [Tree rows](#/tree-rows), [Aggregate](#/aggregate), [Selection](#/selection), [Row appearance](#/row-appearance), [RowDetail](#/rowdetail), [Toolbar](#/toolbar), [Toolbar controls](#/toolbar-controls), [Export](#/export), [View](#/view), [Pagination](#/pagination), [Virtualisation](#/virtualisation), [Server mode](#/server-mode), [Grid mode](#/grid-mode), [Edits](#/edits) and [AlarmList](#/alarmlist).
|
|
11991
12028
|
|
|
11992
12029
|
##### `Toolbar`
|
|
11993
12030
|
|
|
11994
12031
|
[Toolbar](#/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).
|
|
11995
12032
|
|
|
11996
|
-
Used on [Scenarios](#/), [First table](#/first-table), [Provider](#/provider), [Column](#/column), [Width and pinning](#/width-and-pinning), [Sorting](#/sorting), [Search](#/search), [Filter](#/filter), [Pre-filter](#/pre-filter), [Grouping](#/grouping), [Tree rows](#/tree-rows), [Aggregate](#/aggregate), [Selection](#/selection), [Row appearance](#/row-appearance), [RowDetail](#/rowdetail), [RowActions](#/rowactions), [Toolbar](#/toolbar), [Toolbar controls](#/toolbar-controls), [ColumnMenu](#/columnmenu), [Export](#/export), [View](#/view), [Pagination](#/pagination), [Virtualisation](#/virtualisation), [
|
|
12033
|
+
Used on [Scenarios](#/), [First table](#/first-table), [Provider](#/provider), [Column](#/column), [Width and pinning](#/width-and-pinning), [Sorting](#/sorting), [Search](#/search), [Filter](#/filter), [Pre-filter](#/pre-filter), [Grouping](#/grouping), [Tree rows](#/tree-rows), [Aggregate](#/aggregate), [Selection](#/selection), [Row appearance](#/row-appearance), [RowDetail](#/rowdetail), [RowActions](#/rowactions), [Toolbar](#/toolbar), [Toolbar controls](#/toolbar-controls), [ColumnMenu](#/columnmenu), [Export](#/export), [View](#/view), [Pagination](#/pagination), [Virtualisation](#/virtualisation), [Server mode](#/server-mode) and [Edits](#/edits).
|
|
11997
12034
|
|
|
11998
12035
|
#### Hooks
|
|
11999
12036
|
|
|
@@ -12004,8 +12041,8 @@ grouping, page, selection, column widths -, and the parts it returns are
|
|
|
12004
12041
|
typed at your row, so that a field name in `Column` is checked by the
|
|
12005
12042
|
compiler.
|
|
12006
12043
|
|
|
12007
|
-
- `rows` – All rows in automatic mode; in
|
|
12008
|
-
- `options` – How a row is keyed, the
|
|
12044
|
+
- `rows` – All rows in automatic mode; in server mode the page a server delivered for the current view.
|
|
12045
|
+
- `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.
|
|
12009
12046
|
- Returns The table's state and its parts: `Table`, `Column`,
|
|
12010
12047
|
`VerdictColumn`, `RowDetail`, `RowActions`, `Action` and `GroupBy`. Pass it
|
|
12011
12048
|
as `of` to a part that stands outside the table.
|
|
@@ -12014,7 +12051,7 @@ as `of` to a part that stands outside the table.
|
|
|
12014
12051
|
function useTable<Z>(rows: readonly Z[], options: TableOptions<Z>): Table<Z>;
|
|
12015
12052
|
```
|
|
12016
12053
|
|
|
12017
|
-
Used on [Scenarios](#/), [Installation](#/installation), [First table](#/first-table), [Provider](#/provider), [Column](#/column), [Formats](#/formats), [Width and pinning](#/width-and-pinning), [Presets](#/presets), [Sorting](#/sorting), [Search](#/search), [Filter](#/filter), [Pre-filter](#/pre-filter), [Grouping](#/grouping), [Tree rows](#/tree-rows), [Aggregate](#/aggregate), [Selection](#/selection), [Row appearance](#/row-appearance), [RowDetail](#/rowdetail), [RowActions](#/rowactions), [Toolbar](#/toolbar), [Toolbar controls](#/toolbar-controls), [ColumnMenu](#/columnmenu), [Export](#/export), [View](#/view), [Pagination](#/pagination), [Virtualisation](#/virtualisation), [
|
|
12054
|
+
Used on [Scenarios](#/), [Installation](#/installation), [First table](#/first-table), [Provider](#/provider), [Column](#/column), [Formats](#/formats), [Width and pinning](#/width-and-pinning), [Presets](#/presets), [Sorting](#/sorting), [Search](#/search), [Filter](#/filter), [Pre-filter](#/pre-filter), [Grouping](#/grouping), [Tree rows](#/tree-rows), [Aggregate](#/aggregate), [Selection](#/selection), [Row appearance](#/row-appearance), [RowDetail](#/rowdetail), [RowActions](#/rowactions), [Toolbar](#/toolbar), [Toolbar controls](#/toolbar-controls), [ColumnMenu](#/columnmenu), [Export](#/export), [View](#/view), [Pagination](#/pagination), [Virtualisation](#/virtualisation), [Server mode](#/server-mode), [Grid mode](#/grid-mode), [Edits](#/edits) and [VerdictColumn](#/verdictcolumn).
|
|
12018
12055
|
|
|
12019
12056
|
##### `useTableSelection`
|
|
12020
12057
|
|
|
@@ -12091,7 +12128,7 @@ one field in `P`, name the field as the second type argument.
|
|
|
12091
12128
|
function column<P, K extends Field<P> = Field<P>>(preset: ColumnPreset<P, K>): ColumnPreset<P, K>;
|
|
12092
12129
|
```
|
|
12093
12130
|
|
|
12094
|
-
Used on [Scenarios](#/), [First table](#/first-table), [Formats](#/formats), [Width and pinning](#/width-and-pinning), [Presets](#/presets), [Sorting](#/sorting), [Filter](#/filter), [Grouping](#/grouping), [Tree rows](#/tree-rows), [View](#/view), [Virtualisation](#/virtualisation), [
|
|
12131
|
+
Used on [Scenarios](#/), [First table](#/first-table), [Formats](#/formats), [Width and pinning](#/width-and-pinning), [Presets](#/presets), [Sorting](#/sorting), [Filter](#/filter), [Grouping](#/grouping), [Tree rows](#/tree-rows), [View](#/view), [Virtualisation](#/virtualisation), [Server mode](#/server-mode), [Grid mode](#/grid-mode), [VerdictColumn](#/verdictcolumn) and [AlarmList](#/alarmlist).
|
|
12095
12132
|
|
|
12096
12133
|
##### `columnFilter`
|
|
12097
12134
|
|
|
@@ -12944,20 +12981,6 @@ The condition of a list filter: the chosen values, an absent one as `null`.
|
|
|
12944
12981
|
type ListCondition<W> = readonly (Present<W> | null)[];
|
|
12945
12982
|
```
|
|
12946
12983
|
|
|
12947
|
-
##### `ManualView<K extends string = string>`
|
|
12948
|
-
|
|
12949
|
-
The view as manual mode reports it to `onViewChange`: the parts that decide
|
|
12950
|
-
the rows - search, conditions, sort, page and page size - are always there,
|
|
12951
|
-
at their default as well. A server has no default of the table's to fall
|
|
12952
|
-
back on, and a view it has to complete is one it completes wrongly.
|
|
12953
|
-
|
|
12954
|
-
```ts
|
|
12955
|
-
type ManualView<K extends string = string> = TableView<K> &
|
|
12956
|
-
Required<Pick<TableView<K>, "search" | "conditions" | "sort" | "page" | "pageSize">>;
|
|
12957
|
-
```
|
|
12958
|
-
|
|
12959
|
-
Used on [Manual mode](#/manual-mode).
|
|
12960
|
-
|
|
12961
12984
|
##### `ModelColumn<Z, K extends string = string>`
|
|
12962
12985
|
|
|
12963
12986
|
A column as the model reads it - what sorting, search, hiding and the
|
|
@@ -13182,8 +13205,8 @@ only what the first leaves open.
|
|
|
13182
13205
|
|
|
13183
13206
|
| Prop | Type | Default | Description |
|
|
13184
13207
|
|---|---|---|---|
|
|
13185
|
-
| `column` *required* | `K` | — | <br>Shown in: [Sort, arrange and export from controls of your own (First table)](#/first-table/sort-arrange-and-export-from-controls-of-your-own), [
|
|
13186
|
-
| `direction` *required* | [`SortDirection`](#type-SortDirection)<br>`"asc" \| "desc"` | — | <br>Shown in: [Sort, arrange and export from controls of your own (First table)](#/first-table/sort-arrange-and-export-from-controls-of-your-own), [
|
|
13208
|
+
| `column` *required* | `K` | — | <br>Shown in: [Sort, arrange and export from controls of your own (First table)](#/first-table/sort-arrange-and-export-from-controls-of-your-own), [A label wider than its column (Width and pinning)](#/width-and-pinning/a-label-wider-than-its-column), [Sort by several columns (Sorting)](#/sorting/sort-by-several-columns) and 10 more |
|
|
13209
|
+
| `direction` *required* | [`SortDirection`](#type-SortDirection)<br>`"asc" \| "desc"` | — | <br>Shown in: [Sort, arrange and export from controls of your own (First table)](#/first-table/sort-arrange-and-export-from-controls-of-your-own), [A label wider than its column (Width and pinning)](#/width-and-pinning/a-label-wider-than-its-column), [Sort by several columns (Sorting)](#/sorting/sort-by-several-columns) and 10 more |
|
|
13187
13210
|
|
|
13188
13211
|
##### `Table<Z>`
|
|
13189
13212
|
|
|
@@ -13192,8 +13215,8 @@ row. Pass it as `of` to a part that stands outside the table.
|
|
|
13192
13215
|
|
|
13193
13216
|
| Prop | Type | Default | Description |
|
|
13194
13217
|
|---|---|---|---|
|
|
13195
|
-
| `Table` *required* | `(props: `[`TableProps`](#/first-table/type-TableProps)`<Z>) => ReactNode` | — | <br>Shown in: [A first table (Installation)](#/installation/first-table), [Show a list of services (First table)](#/first-table/first-table), [Search and page from a header of your own (First table)](#/first-table/search-and-page-from-a-header-of-your-own) and
|
|
13196
|
-
| `Column` *required* | [`ColumnComponent`](#type-ColumnComponent)`<Z>` | — | <br>Shown in: [A first table (Installation)](#/installation/first-table), [Show a list of services (First table)](#/first-table/first-table), [Search and page from a header of your own (First table)](#/first-table/search-and-page-from-a-header-of-your-own) and
|
|
13218
|
+
| `Table` *required* | `(props: `[`TableProps`](#/first-table/type-TableProps)`<Z>) => ReactNode` | — | <br>Shown in: [A first table (Installation)](#/installation/first-table), [Show a list of services (First table)](#/first-table/first-table), [Search and page from a header of your own (First table)](#/first-table/search-and-page-from-a-header-of-your-own) and 114 more |
|
|
13219
|
+
| `Column` *required* | [`ColumnComponent`](#type-ColumnComponent)`<Z>` | — | <br>Shown in: [A first table (Installation)](#/installation/first-table), [Show a list of services (First table)](#/first-table/first-table), [Search and page from a header of your own (First table)](#/first-table/search-and-page-from-a-header-of-your-own) and 114 more |
|
|
13197
13220
|
| `VerdictColumn` *required* | [`VerdictColumnComponent`](#type-VerdictColumnComponent)`<Z>` | — | <br>Shown in: [Pin columns to both sides (Width and pinning)](#/width-and-pinning/pinned-both-sides), [Read a day's deliveries by depot (Grouping)](#/grouping/the-dispatch-report), [Carry the worst verdict up (Aggregate)](#/aggregate/worst-verdict) and 5 more |
|
|
13198
13221
|
| `RowDetail` *required* | `(props: `[`RowDetailProps`](#/rowdetail/type-RowDetailProps)`<Z>) => ReactNode` | — | <br>Shown in: [Keep the header and the names in view (Width and pinning)](#/width-and-pinning/sticky-parts), [Employees in the detail (Tree rows)](#/tree-rows/employees-in-the-detail), [Own staff and teams (Tree rows)](#/tree-rows/own-staff-and-teams) and 5 more |
|
|
13199
13222
|
| `RowActions` *required* | `(props: `[`RowActionsProps`](#/rowactions/type-RowActionsProps)`) => ReactNode` | — | <br>Shown in: [Name the row (Column)](#/column/row-header), [Pin columns to both sides (Width and pinning)](#/width-and-pinning/pinned-both-sides), [Select a whole group (Grouping)](#/grouping/a-whole-group-selected) and 7 more |
|
|
@@ -13224,7 +13247,7 @@ row. Pass it as `of` to a part that stands outside the table.
|
|
|
13224
13247
|
| `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)](#/filter/conditions-from-outside) |
|
|
13225
13248
|
| `setFilter` *required* | [`SetFilter`](#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)](#/filter/conditions-from-outside), [Filter by a field no column shows (Filter)](#/filter/a-field-no-column-shows), [Rows from a request (Filter)](#/filter/rows-from-a-request) and 5 more |
|
|
13226
13249
|
| `conditionOf` *required* | `<B>(filter: `[`RowFilter`](#/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)](#/filter/a-field-no-column-shows), [Rows from a request (Filter)](#/filter/rows-from-a-request), [Ask a question over several fields (Filter)](#/filter/a-question-over-several-fields) and 3 more |
|
|
13227
|
-
| `selection` *required* | [`TableSelection`](#type-TableSelection)`<string>` | — | The selection – its own or the one handed in through `selection`. From `TableSnapshot`.<br>Shown in: [Select rows (Selection)](#/selection/selection), [Scroll twenty thousand rows (Virtualisation)](#/virtualisation/virtualisation), [Load pages from a server (
|
|
13250
|
+
| `selection` *required* | [`TableSelection`](#type-TableSelection)`<string>` | — | The selection – its own or the one handed in through `selection`. From `TableSnapshot`.<br>Shown in: [Select rows (Selection)](#/selection/selection), [Scroll twenty thousand rows (Virtualisation)](#/virtualisation/virtualisation), [Load pages from a server (Server mode)](#/server-mode/a-million-rows-on-a-server) and 1 more |
|
|
13228
13251
|
| `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)](#/grouping/group-and-fold-from-controls-of-your-own) |
|
|
13229
13252
|
| `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)](#/grouping/group-and-fold-from-controls-of-your-own) |
|
|
13230
13253
|
| `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)](#/grouping/group-and-fold-from-controls-of-your-own) |
|
|
@@ -13236,12 +13259,12 @@ row. Pass it as `of` to a part that stands outside the table.
|
|
|
13236
13259
|
| `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)](#/tree-rows/open-branches-from-controls-of-your-own) |
|
|
13237
13260
|
| `foldAllBranches` *required* | `() => void` | — | Tree rows: closes every branch. From `TableSnapshot`.<br>Shown in: [Open branches from controls of your own (Tree rows)](#/tree-rows/open-branches-from-controls-of-your-own) |
|
|
13238
13261
|
| `view` *required* | [`TableView`](#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)](#/filter/conditions-from-outside), [Fold groups into a summary (Grouping)](#/grouping/the-overview), [Keep and restore a view (View)](#/view/initial-view) |
|
|
13239
|
-
| `asCsv` *required* | `() => string` | — | The filtered set in the visible columns as text for a spreadsheet - in
|
|
13262
|
+
| `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)](#/first-table/sort-arrange-and-export-from-controls-of-your-own) |
|
|
13240
13263
|
| `virtual` *required* | `boolean` | — | Whether it virtualises. From `TableSnapshot`.<br>Shown in: [Search and page from a header of your own (First table)](#/first-table/search-and-page-from-a-header-of-your-own) |
|
|
13241
|
-
| `rowCount` *required* | `number` | — | How many rows the filtered set has - in
|
|
13242
|
-
| `
|
|
13264
|
+
| `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)](#/first-table/search-and-page-from-a-header-of-your-own) |
|
|
13265
|
+
| `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)](#/first-table/sort-arrange-and-export-from-controls-of-your-own) |
|
|
13243
13266
|
|
|
13244
|
-
Used on [Scenarios](#/), [Installation](#/installation), [First table](#/first-table), [Provider](#/provider), [Column](#/column), [Formats](#/formats), [Width and pinning](#/width-and-pinning), [Presets](#/presets), [Sorting](#/sorting), [Search](#/search), [Filter](#/filter), [Pre-filter](#/pre-filter), [Grouping](#/grouping), [Tree rows](#/tree-rows), [Aggregate](#/aggregate), [Selection](#/selection), [Row appearance](#/row-appearance), [RowDetail](#/rowdetail), [RowActions](#/rowactions), [Toolbar](#/toolbar), [Toolbar controls](#/toolbar-controls), [ColumnMenu](#/columnmenu), [Export](#/export), [View](#/view), [Pagination](#/pagination), [Virtualisation](#/virtualisation), [
|
|
13267
|
+
Used on [Scenarios](#/), [Installation](#/installation), [First table](#/first-table), [Provider](#/provider), [Column](#/column), [Formats](#/formats), [Width and pinning](#/width-and-pinning), [Presets](#/presets), [Sorting](#/sorting), [Search](#/search), [Filter](#/filter), [Pre-filter](#/pre-filter), [Grouping](#/grouping), [Tree rows](#/tree-rows), [Aggregate](#/aggregate), [Selection](#/selection), [Row appearance](#/row-appearance), [RowDetail](#/rowdetail), [RowActions](#/rowactions), [Toolbar](#/toolbar), [Toolbar controls](#/toolbar-controls), [ColumnMenu](#/columnmenu), [Export](#/export), [View](#/view), [Pagination](#/pagination), [Virtualisation](#/virtualisation), [Server mode](#/server-mode), [Grid mode](#/grid-mode), [Edits](#/edits) and [VerdictColumn](#/verdictcolumn).
|
|
13245
13268
|
|
|
13246
13269
|
##### `TableInput<Z = unknown, K extends string = string>`
|
|
13247
13270
|
|
|
@@ -13258,7 +13281,7 @@ columns: search, filter, sort, page, hidden columns, order, grouping, tree.
|
|
|
13258
13281
|
| `hidden` | `readonly K[]` | — | Ids of columns switched away. Columns that are not hideable stay. |
|
|
13259
13282
|
| `order` | `readonly K[]` | — | The wanted column order. Columns not named follow in their natural order; unknown ids are passed over. |
|
|
13260
13283
|
| `grouping` | `{ levels: readonly `[`GroupLevel`](#type-GroupLevel)`<Z>[]; aggregates?: readonly `[`AggregateColumn`](#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. |
|
|
13261
|
-
| `
|
|
13284
|
+
| `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. |
|
|
13262
13285
|
| `tree` | [`TreeInput`](#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 (table-tree-rows). |
|
|
13263
13286
|
|
|
13264
13287
|
##### `TableOptions`
|
|
@@ -13283,6 +13306,20 @@ type TableRef = Omit<TableSnapshot<unknown>, "setFilter" | "conditionOf"> & {
|
|
|
13283
13306
|
|
|
13284
13307
|
Used on [First table](#/first-table).
|
|
13285
13308
|
|
|
13309
|
+
##### `TableRequest<K extends string = string>`
|
|
13310
|
+
|
|
13311
|
+
The request server mode reports to `onRequest`: the parts of the view that
|
|
13312
|
+
decide the rows - search, conditions, sort, page and page size - and
|
|
13313
|
+
nothing else, each at its default as well. A server has no default of the
|
|
13314
|
+
table's to fall back on, and a request it has to complete is one it
|
|
13315
|
+
completes wrongly. A width, an order, a pin or a fold is no part of it.
|
|
13316
|
+
|
|
13317
|
+
```ts
|
|
13318
|
+
type TableRequest<K extends string = string> = Required<Pick<TableView<K>, "search" | "conditions" | "sort" | "page" | "pageSize">>;
|
|
13319
|
+
```
|
|
13320
|
+
|
|
13321
|
+
Used on [Server mode](#/server-mode).
|
|
13322
|
+
|
|
13286
13323
|
##### `TableSelection<T extends string | number>`
|
|
13287
13324
|
|
|
13288
13325
|
What `useTableSelection` returns: the selected keys and the gestures on
|
|
@@ -13313,11 +13350,11 @@ the application.
|
|
|
13313
13350
|
|
|
13314
13351
|
| Prop | Type | Default | Description |
|
|
13315
13352
|
|---|---|---|---|
|
|
13316
|
-
| `search` | `string` | — | <br>Shown in: [Show loading, empty, failed and no match (Row appearance)](#/row-appearance/states), [Hand the table one page (
|
|
13317
|
-
| `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)](#/filter/a-question-over-several-fields), [A dispatcher's bar (Toolbar controls)](#/toolbar-controls/a-dispatcher-s-bar), [Hand the table one page (
|
|
13318
|
-
| `sort` | `readonly `[`SortLevel`](#type-SortLevel)`<K>[]` | — | <br>Shown in: [Keep and restore a view (View)](#/view/initial-view), [Hand the table one page (
|
|
13319
|
-
| `page` | `number` | — | <br>Shown in: [Hand the table one page (
|
|
13320
|
-
| `pageSize` | `number` | — | <br>Shown in: [Hand the table one page (
|
|
13353
|
+
| `search` | `string` | — | <br>Shown in: [Show loading, empty, failed and no match (Row appearance)](#/row-appearance/states), [Hand the table one page (Server mode)](#/server-mode/only-pages), [Sort and search on the server (Server mode)](#/server-mode/sort-and-search) and 3 more |
|
|
13354
|
+
| `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)](#/filter/a-question-over-several-fields), [A dispatcher's bar (Toolbar controls)](#/toolbar-controls/a-dispatcher-s-bar), [Hand the table one page (Server mode)](#/server-mode/only-pages) and 4 more |
|
|
13355
|
+
| `sort` | `readonly `[`SortLevel`](#type-SortLevel)`<K>[]` | — | <br>Shown in: [Keep and restore a view (View)](#/view/initial-view), [Hand the table one page (Server mode)](#/server-mode/only-pages), [Sort and search on the server (Server mode)](#/server-mode/sort-and-search) and 3 more |
|
|
13356
|
+
| `page` | `number` | — | <br>Shown in: [Hand the table one page (Server mode)](#/server-mode/only-pages), [Sort and search on the server (Server mode)](#/server-mode/sort-and-search), [Name the values a list filter offers (Server mode)](#/server-mode/filter-options) and 2 more |
|
|
13357
|
+
| `pageSize` | `number` | — | <br>Shown in: [Hand the table one page (Server mode)](#/server-mode/only-pages), [Sort and search on the server (Server mode)](#/server-mode/sort-and-search), [Name the values a list filter offers (Server mode)](#/server-mode/filter-options) and 2 more |
|
|
13321
13358
|
| `hidden` | `readonly K[]` | — | <br>Shown in: [Keep and restore a view (View)](#/view/initial-view) |
|
|
13322
13359
|
| `order` | `readonly K[]` | — | |
|
|
13323
13360
|
| `widths` | `Readonly<Record<string, number>>` | — | Column widths the user has dragged, in pixels. |
|