mirror of
https://github.com/ToolJet/ToolJet
synced 2026-05-05 22:38:48 +00:00
Adds the not equals and not matches filters (#2287)
This commit is contained in:
parent
d9c2c0697e
commit
1ccd10dc23
1 changed files with 12 additions and 0 deletions
|
|
@ -242,12 +242,22 @@ export function Table({
|
|||
if (filterValue.operation === 'equals') {
|
||||
return rows.filter((row) => row.values[columnIds[0]] === filterValue.value);
|
||||
}
|
||||
|
||||
if (filterValue.operation === 'ne') {
|
||||
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 === 'nl') {
|
||||
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);
|
||||
|
|
@ -1051,7 +1061,9 @@ export function Table({
|
|||
options={[
|
||||
{ name: 'contains', value: 'contains' },
|
||||
{ name: 'matches', value: 'matches' },
|
||||
{ name: 'does not match', value: 'nl' },
|
||||
{ name: 'equals', value: 'equals' },
|
||||
{ name: 'does not equal', value: 'ne' },
|
||||
{ name: 'greater than', value: 'gt' },
|
||||
{ name: 'less than', value: 'lt' },
|
||||
{ name: 'greater than or equals', value: 'gte' },
|
||||
|
|
|
|||
Loading…
Reference in a new issue