mirror of
https://github.com/ToolJet/ToolJet
synced 2026-05-23 17:08:34 +00:00
Feature: 'Matches' filter for tables
This commit is contained in:
parent
dd1720b4ab
commit
14703b584d
1 changed files with 5 additions and 0 deletions
|
|
@ -178,6 +178,10 @@ export function Table({
|
|||
return rows.filter((row) => row.values[columnIds[0]] === filterValue.value);
|
||||
}
|
||||
|
||||
if (filterValue.operation === 'matches') {
|
||||
return rows.filter((row) => row.values[columnIds[0]].toString().toLowerCase().includes(filterValue.value.toLowerCase()));
|
||||
}
|
||||
|
||||
if (filterValue.operation === 'gt') {
|
||||
return rows.filter((row) => row.values[columnIds[0]] > filterValue.value);
|
||||
}
|
||||
|
|
@ -627,6 +631,7 @@ export function Table({
|
|||
<SelectSearch
|
||||
options={[
|
||||
{ name: 'contains', value: 'contains' },
|
||||
{ name: 'matches', value: 'matches' },
|
||||
{ name: 'equals', value: 'equals' },
|
||||
{ name: 'greater than', value: 'gt' },
|
||||
{ name: 'less than', value: 'lt' },
|
||||
|
|
|
|||
Loading…
Reference in a new issue