The grid (rendering) ยท console.warn
Column '{colId}' classWhen['{class}'] could not be read as a rule: '{text}'. Use a function, or a rule such as 'lt 0', '>= 1000', 'eq Open', 'contains urgent', 'blank'. Valid operators (spec 9.3): {list}.
Printed by The grid (rendering), prefixed [lattice], since 1.0.1.
Warnings reference › classwhen:*:*
- Identifier
classwhen:*:*- Raised by
- The grid (rendering)
- Since
- 1.0.1
What happened
A classWhen rule string could not be parsed into an operator and an operand, so the rule is dropped and that class is never applied. Nothing is guessed - a rule that was read wrongly would colour the wrong rows, which is worse than not colouring them.
The fix
Write the rule as <operator> <operand>, using one of the operators listed in the message, or pass a predicate function instead.
The smallest fix
cell: { classWhen: { 'lat-negative': 'lt 0', 'lat-urgent': (p) => p.row.priority === 1 } }
Reference
Covered in full at the API reference.