@agile-team/mach-table 0.13.0 → 0.15.0

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/README.md CHANGED
@@ -20,7 +20,9 @@ const api = createGrid(document.querySelector("#grid")!, {
20
20
  { field: "name", headerName: "Name", flex: 1, editable: true }
21
21
  ],
22
22
  rowData: [{ id: "1", name: "MachTable" }],
23
- getRowId: ({ data }) => data.id
23
+ rowKey: "id",
24
+ enableColumnResize: true,
25
+ stateKey: "customer-list"
24
26
  });
25
27
 
26
28
  // Required for native integrations when the host is removed.
@@ -39,7 +41,7 @@ await api.applyTransactionAsync({ update: realtimeRows });
39
41
  api.applyState(state);
40
42
  ```
41
43
 
42
- 0.13 adds a built-in/headless column workbench and cancellable lazy trees:
44
+ 0.13 added a built-in/headless column workbench and cancellable lazy trees:
43
45
 
44
46
  ```ts
45
47
  api.openColumnWorkbench();
@@ -71,6 +73,22 @@ const options = {
71
73
 
72
74
  Cell mode remains the default and renders a subtle pencil plus inline confirm/cancel controls. Use `editableIndicator: "always" | "hover" | "none"` to match the page density.
73
75
 
76
+ 0.14 removes common page glue with automatic GridState persistence, an explicit error overlay, compact row keys and framework-neutral toolbar commands:
77
+
78
+ ```ts
79
+ import { createMachTableCommands } from "@agile-team/mach-table";
80
+
81
+ const commands = createMachTableCommands({ getApi: () => api });
82
+ commands.search("pending");
83
+ await commands.refresh();
84
+
85
+ api.setOverlay("error", () => "Request failed. Please retry.");
86
+ ```
87
+
88
+ `rowKey: "id"` is shorthand for a stable field path; `getRowId` remains available for derived IDs and wins when both are present. `domLayout: "autoHeight"` is intended only for small client-side tables—normal virtual layout remains the large-data default.
89
+
90
+ Column resizing is deliberately opt-in. Set `enableColumnResize: true`; add `stateKey` to remember the complete workspace, or `columnStateKey` to remember only widths/order/visibility/pinning/sort. Pointer cancellation rolls back, completed drags persist once, and untouched automatic/flex columns remain responsive.
91
+
74
92
  For framework applications use the official adapters:
75
93
 
76
94
  - Vue 3: [`@agile-team/mach-table-vue`](https://www.npmjs.com/package/@agile-team/mach-table-vue)