RowTransaction
A batch of row mutations to apply atomically in a single render cycle.
All adds, updates, and removes are processed together with one re-render,
making this far more efficient than calling insertRow, updateRow, and
removeRow individually — especially for high-frequency streaming data.
Row identification for update and remove uses the grid’s configured
getRowId function.
Example
Section titled “Example”// Apply a mixed transaction from a WebSocket messageconst result = await grid.applyTransaction({ add: [{ id: 'new-1', name: 'Alice', status: 'Active' }], update: [{ id: 'emp-5', changes: { status: 'Inactive' } }], remove: [{ id: 'emp-3' }],});
console.log(`Added: ${result.added.length}, Updated: ${result.updated.length}, Removed: ${result.removed.length}`);Properties
Section titled “Properties”| Property | Type | Description |
|---|---|---|
add? | TRow[] | Rows to insert. Appended at the end of the current view. |
update? | RowUpdate<TRow>[] | Rows to update in-place by ID. |
remove? | object[] | Rows to remove by ID. |
See Also
Section titled “See Also”TransactionResultfor the result structure
AI assistants: For complete API documentation, implementation guides, and code examples for this library, see https://raw.githubusercontent.com/OysteinAmundsen/toolbox/main/llms-full.txt