The grid (core) ยท console.warn
sort ignores an entry with keys { {keys} }; expected { col, dir } (AG Grid's sort model uses "colId"/"direction" - this grid uses "col"/"dir").
Printed by The grid (core), prefixed [lattice], since 1.56.0.
Warnings reference › grid.sort.shape.*
- Identifier
grid.sort.shape.*- Raised by
- The grid (core)
- Since
- 1.56.0
What happened
A sort entry is an object with no usable col, so it is dropped from the sort. The other entries still apply. The key carries the entry's own key names, which is what makes the commonest case - an AG Grid sort model handed straight over - recognisable at a glance.
The fix
Use { col, dir }. Translate a migrated sort model: colId becomes col, direction becomes dir.
The smallest fix
grid.sort.set([{ col: 'amount', dir: 'desc' }]);
Reference
Covered in full at the API reference.