Text Filter
Use the Core text filter for names, labels, codes, descriptions, and other values that users should match by typing. It needs no Pro plugin.
Source code
TypeScriptts
grid.columns = [{ prop: 'name', name: 'Name', filter: 'string' }];
grid.filter = true;
return [
{ name: 'Anna' },
{ name: 'John' },
{ name: 'Diana' },
{ name: 'Marco' },
];Quick start
Section titled “Quick start”const grid = document.querySelector('revo-grid')!;
grid.columns = [ { prop: 'name', name: 'Name', filter: 'string' }, { prop: 'status', name: 'Status', filter: 'string' },];grid.filter = true;grid.source = [ { name: 'Anna Silva', status: 'Open' }, { name: 'John Smith', status: 'Pending' },];Open a column’s filter button, choose Contains, enter text, and apply. Text equality, begins-with, and contains matching are case-insensitive.
Operators
Section titled “Operators”| Saved ID | Popup label | Needs a value |
|---|---|---|
contains | Contains | Yes |
notContains | Does not contain | Yes |
begins | Begins with | Yes |
eq | Equal | Yes |
notEq | Not equal | Yes |
empty | Is blank | No |
notEmpty | Is not blank | No |
An empty text input is a no-op. Blank operators use the grid’s source-aware blank policy, not a display-string conversion.
Start with a condition
Section titled “Start with a condition”grid.filter = { multiFilterItems: { status: [{ id: 1, type: 'eq', value: 'Open', relation: 'and' }], },};Combine alternatives within one column with or:
grid.filter = { multiFilterItems: { status: [ { id: 1, type: 'eq', value: 'Open', relation: 'or' }, { id: 2, type: 'eq', value: 'Pending', relation: 'and' }, ], },};Different columns always combine with AND in multiFilterItems. Use Filter AST for cross-column OR.
Filter a normalized value
Section titled “Filter a normalized value”Conditions receive cellParser output when the stored model needs normalization:
grid.columns = [ { prop: 'customerCode', name: 'Customer code', filter: 'string', cellParser: (model, column) => String(model[column.prop] ?? '').trim(), },];Common mistakes
Section titled “Common mistakes”- Use
eq, not the numericeqN, for a text column. - Do not expect text conditions on different columns to combine with OR.
- Use Selection Filter when users should choose from repeated known values instead of typing.
- Use Token List when users paste several exact values at once.