Add string_not_contains operator
Summary: Doc: https://docs.google.com/document/d/1miofxds9DJgWScj0zFyBbdpRH5Rj0T9FqiCapof5-vU/edit#heading=h.pg8svtdjlx7 Reviewed By: lblasa Differential Revision: D49230139 fbshipit-source-id: 23d0f9f8f50906c940764e3e9e5382ead9be9d35
This commit is contained in:
committed by
Facebook GitHub Bot
parent
ceac388eed
commit
3206649a29
@@ -21,6 +21,11 @@ export const dataTablePowerSearchOperators = {
|
|||||||
key: 'string_contains',
|
key: 'string_contains',
|
||||||
valueType: 'STRING',
|
valueType: 'STRING',
|
||||||
}),
|
}),
|
||||||
|
string_not_contains: () => ({
|
||||||
|
label: 'does not contain',
|
||||||
|
key: 'string_not_contains',
|
||||||
|
valueType: 'STRING',
|
||||||
|
}),
|
||||||
} satisfies {
|
} satisfies {
|
||||||
[key: string]: (...args: any[]) => OperatorConfig;
|
[key: string]: (...args: any[]) => OperatorConfig;
|
||||||
};
|
};
|
||||||
@@ -34,4 +39,8 @@ export const dataTablePowerSearchOperatorProcessorConfig = {
|
|||||||
(value as string)
|
(value as string)
|
||||||
.toLowerCase()
|
.toLowerCase()
|
||||||
.includes((searchValue as string).toLowerCase()),
|
.includes((searchValue as string).toLowerCase()),
|
||||||
|
string_not_contains: (operator, searchValue, value) =>
|
||||||
|
!(value as string)
|
||||||
|
.toLowerCase()
|
||||||
|
.includes((searchValue as string).toLowerCase()),
|
||||||
} satisfies PowerSearchOperatorProcessorConfig;
|
} satisfies PowerSearchOperatorProcessorConfig;
|
||||||
|
|||||||
Reference in New Issue
Block a user