Skip to content
This repository was archived by the owner on Jul 28, 2025. It is now read-only.

Commit a537637

Browse files
committed
new filter : does not contain
1 parent ef20fd8 commit a537637

File tree

4 files changed

+6
-0
lines changed

4 files changed

+6
-0
lines changed

src/helpers/Constants.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -300,6 +300,7 @@ export const OperatorFilter = Object.freeze({
300300
GREATER_THAN_OR_EQUAL: ['GREATER_THAN_OR_EQUAL', '>='],
301301
LESS_THAN_OR_EQUAL: ['LESS_THAN_OR_EQUAL', '<='],
302302
CONTAINS: ['CONTAINS', 'operator_contains'],
303+
NOT_CONTAINS: ['NOT_CONTAINS', 'operator_does_not_contain'],
303304
STARTS_WITH: ['STARTS_WITH', 'operator_starts_with'],
304305
ENDS_WITH: ['ENDS_WITH', 'operator_ends_with'],
305306
IS_EMPTY: ['IS_EMPTY', 'operator_is_empty'],

src/helpers/TableFiltersHelper.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -70,6 +70,9 @@ function validateFilter(p: Record<string, Literal>, filter: FilterGroup, ddbbCon
7070
case OperatorFilter.CONTAINS[1]:
7171
if (!filterableValue.toString().includes(value)) return false;
7272
break;
73+
case OperatorFilter.NOT_CONTAINS[1]:
74+
if (filterableValue.toString().includes(value)) return false;
75+
break;
7376
case OperatorFilter.STARTS_WITH[1]:
7477
if (!filterableValue.toString().startsWith(value)) return false;
7578
break;

src/lang/locale/en.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ export default {
88
'menu_pane_open_as_md_action': 'Open as Markdown',
99
/** OPERATOR FILTERS */
1010
'operator_contains': 'Contains',
11+
'operator_does_not_contain': 'Does not contain',
1112
'operator_starts_with': 'Starts with',
1213
'operator_ends_with': 'Ends with',
1314
'operator_is_empty': 'Is empty',

src/lang/locale/es.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ export default {
88
'menu_pane_open_as_md_action': 'Abrir como Markdown',
99
/** OPERATOR FILTERS */
1010
'operator_contains': 'Contiene',
11+
'operator_does_not_contain': 'No contiene',
1112
'operator_starts_with': 'Comienza con',
1213
'operator_ends_with': 'Termina con',
1314
'operator_is_empty': 'Está vacío',

0 commit comments

Comments
 (0)