Skip to content

CellChangeDetail

Detail for cell-change event (emitted by core after mutation). This is an informational event that fires for ALL data mutations.

Use this event for:

  • Logging/auditing changes
  • Cascading updates (updating other fields based on a change)
  • Syncing changes to external state
grid.on('cell-change', ({ row, rowId, field, oldValue, newValue, source }) => {
console.log(`${field} changed from ${oldValue} to ${newValue}`);
console.log(`Change source: ${source}`);
// Cascade: update total when price changes
if (source === 'user' && field === 'price') {
grid.updateRow(rowId, { total: newValue * row.quantity });
}
});
PropertyTypeDescription
rowTRowThe row object (after mutation)
rowIdstringStable row identifier
rowIndexnumberCurrent index in rows array
fieldstringField that changed
oldValueunknownValue before change
newValueunknownValue after change
changesPartial<TRow>All changes passed to updateRow/updateRows (for context)
sourceUpdateSourceOrigin of this change
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