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
Example
Section titled “Example”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 }); }});Properties
Section titled “Properties”| Property | Type | Description |
|---|---|---|
row | TRow | The row object (after mutation) |
rowId | string | Stable row identifier |
rowIndex | number | Current index in rows array |
field | string | Field that changed |
oldValue | unknown | Value before change |
newValue | unknown | Value after change |
changes | Partial<TRow> | All changes passed to updateRow/updateRows (for context) |
source | UpdateSource | Origin of this change |
See Also
Section titled “See Also”UpdateSourcefor understanding change originsCellCommitDetailfor the commit event (editing lifecycle)
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