diff --git a/example/index.tsx b/example/index.tsx index 219f2f5..0d13ab2 100644 --- a/example/index.tsx +++ b/example/index.tsx @@ -97,7 +97,14 @@ export const fields: BuilderFieldProps[] = [ field: 'BLAH', label: 'Blah', type: 'TEXT', - operators: ['NOT_BETWEEN', 'EQUAL', 'NOT_EQUAL', 'BETWEEN'], + operators: [ + 'NOT_BETWEEN', + 'EQUAL', + 'NOT_EQUAL', + 'BETWEEN', + 'LIKE', + 'NOT_LIKE', + ], }, { field: 'HAS_LOW_CREDIT', diff --git a/src/components/Builder.tsx b/src/components/Builder.tsx index 0a21a86..a19013c 100644 --- a/src/components/Builder.tsx +++ b/src/components/Builder.tsx @@ -46,7 +46,9 @@ export type BuilderFieldOperator = | 'ANY_IN' | 'NOT_IN' | 'BETWEEN' - | 'NOT_BETWEEN'; + | 'NOT_BETWEEN' + | 'LIKE' + | 'NOT_LIKE'; export type BuilderGroupValues = 'AND' | 'OR'; diff --git a/src/constants/strings.ts b/src/constants/strings.ts index d9cac16..11524c9 100644 --- a/src/constants/strings.ts +++ b/src/constants/strings.ts @@ -25,6 +25,8 @@ export interface Strings { NOT_IN?: string; BETWEEN?: string; NOT_BETWEEN?: string; + LIKE?: string; + NOT_LIKE?: string; }; } @@ -55,5 +57,7 @@ export const strings: Strings = { NOT_IN: 'Not in', BETWEEN: 'Between', NOT_BETWEEN: 'Not between', + LIKE: 'Like', + NOT_LIKE: 'Not like' }, };