Skip to content

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.

// Apply a mixed transaction from a WebSocket message
const 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}`);
PropertyTypeDescription
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.
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