The grid (core) ยท console.warn
rows.apply needs a rowKey to identify rows; without one, updates and removals cannot be matched.
Printed by The grid (core), prefixed [lattice], since 1.0.1.
Warnings reference › changes.unkeyed
- Identifier
changes.unkeyed- Raised by
- The grid (core)
- Since
- 1.0.1
What happened
A keyed diff names the rows it changes, and this grid identifies rows by index because no rowKey was declared. There is no way to match an update or a removal to a row, so those parts of the change cannot be applied.
The fix
Declare rowKey - the field that identifies a row, or a function returning it. Keyed identity is what the live-update, diff, selection-stability and comment features all need.
The smallest fix
createGrid(el, { rowKey: 'id' });
Reference
Covered in full at the API reference.