The grid (rendering) ยท console.warn
invalid regular expression in a "matches" filter: {pattern}
Printed by The grid (rendering), prefixed [lattice], since 1.0.1.
Warnings reference › filter:regex:*
- Identifier
filter:regex:*- Raised by
- The grid (rendering)
- Since
- 1.0.1
What happened
A matches condition holds a pattern that will not compile, so the condition cannot be evaluated. It answers false for every row - the filter excludes everything rather than including everything, which is the fail-closed behaviour the filter pipeline requires.
The fix
Correct the pattern. It is compiled with new RegExp, case-insensitively unless the condition sets caseSensitive.
The smallest fix
grid.filters.set({ colId: 'name', op: 'matches', value: '^ACME-\\d+$' });
Reference
Covered in full at the API reference.